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!
6735 Solvers
Create a square matrix of multiples
383 Solvers
Return the first and last characters of a character array
3483 Solvers
Remove the two elements next to NaN value
414 Solvers
Flip the vector from right to left
2690 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!