Matlab if 2 functions exist
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Respuestas (1)
Walter Roberson
el 28 de En. de 2012
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.
0 comentarios
Ver también
Categorías
Más información sobre Variables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!