How to I add zeroes onto a matrix?
Show older comments
So I have a matrix, that needs to be 1x52500. If it isnt, I want to pad zeroes onto the end. This is what I have, but it did not add the zeroes.
Matrix = zeros(1,52500);
if length(index) ~= length(Matrix)
padarray(index,[0 1],0,'post')
end
Accepted Answer
More Answers (1)
Stephen23
on 22 Sep 2021
Where V is your vector:
V(end+1:52500) = 0
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!