Inserting space between values in vector
이전 댓글 표시
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!!
채택된 답변
추가 답변 (1개)
per isakson
2012년 8월 16일
편집: per isakson
2012년 8월 16일
One more way to do it
x = 1:4;
x1 = cat( 1, x, zeros(size(x)) );
x1 = transpose(x1(:));
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!