Inserting space between values in vector
Ältere Kommentare anzeigen
Hi,
Say I have a vector x = [1 2 3 4] How can I make it x1 = [1 0 2 0 3 0 4 0]
Thank you!!
Akzeptierte Antwort
Weitere Antworten (1)
per isakson
am 16 Aug. 2012
Bearbeitet: per isakson
am 16 Aug. 2012
One more way to do it
x = 1:4;
x1 = cat( 1, x, zeros(size(x)) );
x1 = transpose(x1(:));
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!