How to use not equal in for loop

Answers (1)

James Tursa
James Tursa on 10 Aug 2020
Edited: James Tursa on 10 Aug 2020
You could use a while loop. E.g.,
t = 0;
while( t ~= 1 )
% code
% at some point, either set t=1 or break out of loop
end

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Asked:

on 10 Aug 2020

Edited:

on 10 Aug 2020

Community Treasure Hunt

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

Start Hunting!