What is wrong with my code?
Z=[3 8 2 4];N=length(z);A(i)=5*Z(i);for i=1:N B(i)=A(i); C(i)=B(i)-Z(i)*3; D(i)=C(i)-10; E(i)=D(i)+5end
I want to have F(i)=[B(i); C(i); D(i); E(i)] that way I can have a matrix with all the values of B(i), C(i), D(i), and E(i) obtained in the for loop.
However, I am getting this error message:
Error in sym/subsasgn (line 700) S = builtin('subsasgn',[],S,zeros(size(B)));Error in Program_1 (line 30)V_total(i)=[VA(i); VB(i)]
How do I fix my code?
Best Answer