フィルターのクリア

concatenate two columns in matlab

13 ビュー (過去 30 日間)
Fadal Sasse
Fadal Sasse 2017 年 8 月 10 日
コメント済み: Fadal Sasse 2017 年 8 月 10 日
Hi there, I want to concatenate two variables from two columns in matrix into one column, for example, I have these variables
A =
1 4 6 3
2 6 9 9
3 7 8 0
I want to join the last two columns to be like this
1 4 63
2 6 99
3 7 80
How to do that? Thanx
  2 件のコメント
Stephen23
Stephen23 2017 年 8 月 10 日
編集済み: Stephen23 2017 年 8 月 10 日
Is that a numeric matrix, or a character matrix, or a cell array containing numeric scalars or characters, or a table, or something else?
Fadal Sasse
Fadal Sasse 2017 年 8 月 10 日
A numeric matrix

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

採用された回答

Walter Roberson
Walter Roberson 2017 年 8 月 10 日
[A(:,1:end-2), A(:,end-1)*10+A(:,end)]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by