clear clc % A=zeros(1,10) % for i=10:-1:1 % A(i)=2*i % end A=[1 2 3 4; 5 6 7 8] s=size(A); s1=s(1); s2=s(2); for i=1:2 for j=1:4 if A(i,j)>3 A(i,j)=A(i,j)*10; else A(i,j)=A(i,j)/4; end end end