Creating an empty figure

I am having trouble creating a blank figure.
This is the code I currently have
tf = isempty(names);
if tf == 1
plot()
elseif opt <1 | opt > 3
plot()
disp("Invalid opt value, it must be either 1, 2, or 3")

Réponses (1)

VBBV
VBBV le 18 Fév 2024

0 votes

tf = isempty(names);
if tf == 1
figure % to generate empty plot
elseif opt <1 | opt > 3
figure
disp("Invalid opt value, it must be either 1, 2, or 3")
end

1 commentaire

VBBV
VBBV le 18 Fév 2024
Modifié(e) : VBBV le 18 Fév 2024
To generate a blank figure use figure command. plot() function requires input arguments. close the if-else statement with keyword, end

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange

Tags

Question posée :

le 17 Fév 2024

Modifié(e) :

le 18 Fév 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by