Create a matrix of values 0 3 14 33 using a for loop where t
Create a matrix of values, 0 3 14 33, using a for loop where the loop variable is a matrix of the values, 0 2 4 6. You may need to use a few of the mathematical operators such as^, *, /, + or - to solve this problem (there may be more than one solution to this program). Be sure that the program then displays the matrix after the loop is executed.
Solution
for i=0:2:6
if (i==0)
a(1)=0;
end
if (i==2)
a(2)=i+1;
end
if(i==4)
a(3)=i+10
end
if(i==6)
a(4)=a(3)+19
end
end
