Clear Filters
Clear Filters

add column of zeros at end of matrix?

50 views (last 30 days)
Evan Charlesworth
Evan Charlesworth on 14 Oct 2018
Answered: Walter Roberson on 14 Oct 2018
I have one matrix that I'm trying to add a column of zeros at the beginning and end of, but so far I can only figure out how to add the column of zeros at the beginning.

Answers (1)

Walter Roberson
Walter Roberson on 14 Oct 2018
zc = zeros(size(YourMatrix,1),1);
newmatrix = [zc, YourMatrix, zc];

Categories

Find more on Word games 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!