restricting the number between limits
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
clc
clear all
a = 10
b = rand(1)
nmc = 100
for i = 1:nmc
c = a - b
if c < a
a = c
else
a = a
end
end
I want to stop the code when value is between 1 and 0 kindly guide
0 Kommentare
Antworten (1)
Hamoon
am 9 Sep. 2015
insert this into for loop:
if (value > 0) && (value < 1)
break;
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu Entering Commands finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!