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

How to set flags in MATLAB?

Asked by Arun Badigannavar on 4 Jan 2013

How to set flags in MATLAB ,,

    flag1=0;
    Do this; 
    flag2=1; 
    Do this;

1 Comment

Jan Simon on 4 Jan 2013

The question is not clear yet. The shown code runs without problems, but I guess you want to get a specific behavior but did not explain this.

Arun Badigannavar

Tags

Products

No products are associated with this question.

2 Answers

Answer by Muruganandham Subramanian on 4 Jan 2013
Edited by Muruganandham Subramanian on 4 Jan 2013

Do this, by if() operation

e.g.

if a==0  
%do this
else if a==1
%do this
end

1 Comment

Arun Badigannavar on 4 Jan 2013

this is common for loop,,but i want to control it from gui ,by setting a flag

Muruganandham Subramanian

Contact us