Matlab if 2 functions exist

Hi, I am trying to figure out how to write for a code to display if only 2 variables are defined, but it seems to only work for one at a time? How can I get this to work?

댓글 수: 1

Jan
Jan 2012년 1월 28일
The question is not clear enough to be answered.

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

답변 (1개)

Walter Roberson
Walter Roberson 2012년 1월 28일

0 개 추천

if exist('Var1', 'var') && exist('Var2', 'var')
display('Monday, Monday')
end
There is no way to pass two variable names to exist() to test both at the same time.

카테고리

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

질문:

2012년 1월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by