I'll give an example of what i have to do.
I need this:
A=[1 0 3 0 5 0];B=zeros(2*length(A),2);for i=1:length(A)%Then that's my problem:
%for i=1, i need:
B=[1 1 3 0 5 0];%for i=2, i need:
B=[1 0 3 1 5 0];%and for i=3, i need:
B= [1 0 3 0 5 1];
How can i do that? I just got B= [1 1;3 1;5 1]
Please, help me!
Thank you, everybody!
Best Answer