sweet
clc
a = 0;
z = 1;
n = 10
for b = 1:n;
if z <= n/2;
a = a+1
z = z+1;
elseif z == n;
z = 0;
else
a = a-1;
z = z+1;
end
end
nice!
Determine whether a vector is monotonically increasing
11927 Solvers
2401 Solvers
Convert a numerical matrix into a cell array of strings
456 Solvers
Return unique values without sorting
589 Solvers
Check if number exists in vector
4474 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!