Borrar filtros
Borrar filtros

Checking if variable exists in GUI

11 visualizaciones (últimos 30 días)
Jakub
Jakub el 12 de Abr. de 2013
Hi, in my GUI i want to check if variable m exists and if so do some stuff with it and if it doesnt exist do something else...I have solution using ishandle function but there are some problems with it and i have to make m global variable and i dont want to. Thanks for help!!

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Abr. de 2013
if exist('m', 'var')
Or is 'm' not in the current workspace?
  1 comentario
Jakub
Jakub el 15 de Abr. de 2013
I have to make m global variable, which is sad. And if m is global variable , it exists but it doesnt containt any value. So one solution is to make m global variable and then instead of ifexist use isempty.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays 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!

Translated by