zero padding column of data
15 ビュー (過去 30 日間)
古いコメントを表示
How do I extend an existing matrix (200x1 double) with a specific number of zeros? i.e. pad the end of the column
0 件のコメント
回答 (3 件)
James Tursa
2015 年 7 月 24 日
n = number of elements to pad with 0's
x = your 200 x 1 double array
x(end+1:end+n) = 0;
0 件のコメント
Star Strider
2015 年 7 月 24 日
Probably the easiest way:
v = rand(200, 1); % Original Vector
Nz = 10; % Number Of Zeros To Pad
v = [v; zeros(Nz,1)]; % Zero-Padded Vector
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!