Oct 2, 2013 Thread starter #1 S suvadip Member Feb 21, 2013 69 r=zeros(1,6); r(1,2:4)=2; r(1,5)= - r for the above program, I want the output as r= 0 2 2 2 - 0 how to do this in matlab? please help

r=zeros(1,6); r(1,2:4)=2; r(1,5)= - r for the above program, I want the output as r= 0 2 2 2 - 0 how to do this in matlab? please help

Oct 16, 2013 #2 Z zzephod Well-known member Feb 3, 2013 134 suvadip said: r=zeros(1,6); r(1,2:4)=2; r(1,5)= - r for the above program, I want the output as r= 0 2 2 2 - 0 how to do this in matlab? please help Click to expand... cell array. .

suvadip said: r=zeros(1,6); r(1,2:4)=2; r(1,5)= - r for the above program, I want the output as r= 0 2 2 2 - 0 how to do this in matlab? please help Click to expand... cell array. .