Files
matlab-learning/lab6/exercise6_c_2.m

9 lines
110 B
Matlab

x=[0,1,0,2,0,3,0,4];
for k=1:8
if x(k)==0
x(k)=k;
else
x(k)=2*k+1;
end
end
disp(x)