Greetings to all,
I need one help, i need to combine the two feature vector, by selecting each one row from two feature vector like in the following form.
A = [ 022.33, 332.22,443.33,1
022.23, 322.23,423.33,1];
B = [232.3,443.2,5323.233,2
222.3,423.2,5323.333,2];
C = [022.33, 332.22,443.33,1
232.3,443.2,5323.233,2
022.23, 322.23,423.33,1
222.3,423.2,5323.333,2]
Thanks in advance..

 채택된 답변

madhan ravi
madhan ravi 2020년 7월 10일

0 개 추천

c = zeros(size([A;B]));
c(1:2:end,:) = A;
c(2:2:end,:) = B

댓글 수: 3

madhan ravi
madhan ravi 2020년 7월 10일
편집: madhan ravi 2020년 7월 10일
Or:
C = reshape([A,B].',[],size(A,2)).'
SATISH comments:
c = zeros(size([A;B]));
c(1:2:end,:) = A;
c(2:2:end,:) = B
This solution worked . Thanks a lot for your solution
SATISH KUMAR
SATISH KUMAR 2020년 9월 10일
Hi, Madhan,
Can you pls help me. can you pls share the code for more than two matrix combining
like matrix : A,B,C,D....

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

질문:

2020년 7월 10일

댓글:

2020년 9월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by