Effacer les filtres
Effacer les filtres

add column of zeros at end of matrix?

51 vues (au cours des 30 derniers jours)
Evan Charlesworth
Evan Charlesworth le 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.

Réponses (1)

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

Catégories

En savoir plus sur Word games dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by