zero padding column of data
조회 수: 7 (최근 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에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!