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일

0 개 추천

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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

질문:

2024년 2월 17일

편집:

2024년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by