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일

0 개 추천

[A(:,1:end-2), A(:,end-1)*10+A(:,end)]

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2017년 8월 10일

댓글:

2017년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by