Creating an empty figure

27 次查看(过去 30 天)
Molly
Molly 2024-2-17
编辑: VBBV 2024-2-18
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")

回答(1 个)

VBBV
VBBV 2024-2-18
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 个评论
VBBV
VBBV 2024-2-18
编辑:VBBV 2024-2-18
To generate a blank figure use figure command. plot() function requires input arguments. close the if-else statement with keyword, end

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by