Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How do u check for the existence of a variable in base workspace from main GUI file?

Asked by Shyam

Shyam (view profile)

on 25 Apr 2013

How do u check for the existence of a variable in base workspace from main GUI file?

0 Comments

Shyam

Shyam (view profile)

Tags

Products

No products are associated with this question.

1 Answer

Answer by the cyclist

the cyclist (view profile)

on 25 Apr 2013
Edited by the cyclist

the cyclist (view profile)

on 25 Apr 2013

I am not very knowledgeable about GUIs, so there is almost certainly a better way, but one way to do this would be with the evalin() function. Specifically, I think you could check for the existence of the variable x with

>> tf = evalin('base','exist(''x'')')

Type

>> doc evalin

for details.

0 Comments

the cyclist

the cyclist (view profile)

Contact us