x=[1 7 12 16];y=zeros(1,20);
I want to show 1 in y at x valued indices.. i.e,
y(1)=1y(7)=1y(12)=1y(16)=1y(for all)=0
how I can stem it automatically without manually zero padding ?
marking
x=[1 7 12 16];y=zeros(1,20);
y(1)=1y(7)=1y(12)=1y(16)=1y(for all)=0
Best Answer