how can i add column in matrix?

3 ビュー (過去 30 日間)
Mira le
Mira le 2019 年 12 月 22 日
コメント済み: Mira le 2019 年 12 月 22 日
A is a matrix:
0 9 8 4 6
9 0 8 4 3
0 6 4 8 9
8 0 4 6 9
9 0 8 4 3
0 9 4 8 6
9 0 8 4 6
how to add another column at the end of matrix A?

採用された回答

Turlough Hughes
Turlough Hughes 2019 年 12 月 22 日
Depends what you want in that column but you could for example add a column of zeros as follows:
A = [A zeros(size(A,1),1)]
  1 件のコメント
Mira le
Mira le 2019 年 12 月 22 日
I want to add a field of struct

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by