Adding a column of zeros at the beginning??

1 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by