when the program is running, is not entering in the loop

dcs1=hdt.DataCursors
pos = get(dcs1(1),'Position');
op1 = pos(1)
op2 = pos(2)
op=[op1 op2]
save d.mat op1 op2
while B<=0
B=a(op1,op2);
op2=op2+1;
end
op2=op2-1

Antworten (2)

Jan
Jan am 19 Feb. 2016

0 Stimmen

Obviously the value of the variable B is greater than 0 initially. You did not show how this variable is defined, so the readers cannot guess this detail.

3 Kommentare

The image is black and white , so 0 stands for black nd 1 for white , in terms of intensity
Jan
Jan am 19 Feb. 2016
Maybe the image is black and white, but what is "B"?
thank u sir. i defined B , and now the program is running

Melden Sie sich an, um zu kommentieren.

Jos (10584)
Jos (10584) am 19 Feb. 2016

0 Stimmen

Apparently B is larger then 0 ... Did you check?

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 19 Feb. 2016

Kommentiert:

am 17 Mär. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by