zero padding column of data
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How do I extend an existing matrix (200x1 double) with a specific number of zeros? i.e. pad the end of the column
0 comentarios
Respuestas (3)
James Tursa
el 24 de Jul. de 2015
n = number of elements to pad with 0's
x = your 200 x 1 double array
x(end+1:end+n) = 0;
0 comentarios
Star Strider
el 24 de Jul. de 2015
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 comentarios
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!