Filter löschen
Filter löschen

Adding a column of zeros at the beginning??

1 Ansicht (letzte 30 Tage)
waell telmesani
waell telmesani am 20 Feb. 2018
Kommentiert: waell telmesani am 20 Feb. 2018
Hi,
if H=[1 2 5 4 1;3 4 3 4 1] , how can I add two columns zeros at the beginning of mateix H?? Because I have a huge matrix and I’m looking for a simple way to that.
Thanks

Akzeptierte Antwort

Birdman
Birdman am 20 Feb. 2018
Something like this?
n=2;
H(:,1+n:end+n)=H(:,1:end);
H(:,1:n)=0

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by