This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Piero Cimule
on 19 Jun 2020
L=length(x);
if L==1
tf=true; % adding a condition for single element
return %we must close the case for faster operation
end
for ii = 1:(L-1)
if x(ii+1) > x(ii)
tf= true ;
else
tf=false ;
break
end
end
end
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!