Hello,
I want to creat an 2D Array with two rows and 7 columns. When this Array is full, I want the second account to replace the first one, the 3rd the second and so on.... The 7th should be replaced by a new account. Can you give me an Idea how to do this?
Best regards

 採用された回答

Roger Stafford
Roger Stafford 2013 年 11 月 29 日

0 投票

I am guessing that by "account" here you actually mean "column". Is that correct? If so, with your 2D matrix called M and a new 2 x 1 "account" (column vector) called b, do this:
M = [M(:,2:end),b];

1 件のコメント

Verena
Verena 2013 年 12 月 1 日
Yes I mean column ( difficult to find the right word ;) ) Thank you! I think your answer helps me :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

質問済み:

2013 年 11 月 28 日

コメント済み:

2013 年 12 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by