Borrar filtros
Borrar filtros

how to check the existence of a variable in the GUI?

1 visualización (últimos 30 días)
Manoj Kumar
Manoj Kumar el 8 de Dic. de 2014
Editada: Geoff Hayes el 9 de Dic. de 2014
Hi,
I have a GUI in which there is a variable"var1" .
I have a condition like this
if exist('variabel1','var')
Number = Edge;
else
Number = edge1;
end
. I tried but it's not working
Can you please help me in solving this. Is there any other way to do this..?
Thanks...
  1 comentario
Geoff Hayes
Geoff Hayes el 9 de Dic. de 2014
Editada: Geoff Hayes el 9 de Dic. de 2014
Manoj - if your variable is named var1, then why are you using variabel1 as the variable name in the call to exist? Also, please elaborate on what you mean by it's not working. Do you observe an error or..? Is this variable an input to some function or..? Please provide some context surrounding the five lines of code in your question.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Particle & Nuclear Physics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by