필터 지우기
필터 지우기

Making a row vector from a nxn matrix

조회 수: 20 (최근 30일)
Jalal Hassan
Jalal Hassan 2020년 6월 25일
댓글: Matt J 2020년 6월 26일
I have a nxn matrix and I want to make n row vectors from that matrix.
For example, I have a Matrix
A = 3×3
1 2 3
4 5 6
7 8 9
From this, I want 3 matrices of order 1x3
B = [1 2 3]
C = [4 5 6]
D = [7 8 9]
I want this to be processed by Matlab itslef.

채택된 답변

Matt J
Matt J 2020년 6월 25일
편집: Matt J 2020년 6월 25일
>> BCD=num2cell(A,2);
>> BCD{:}
ans =
1 2 3
ans =
4 5 6
ans =
7 8 9
  댓글 수: 2
Jalal Hassan
Jalal Hassan 2020년 6월 26일
편집: Jalal Hassan 2020년 6월 26일
I need to save those three vectors to B, C, D vectors beacuse I have to perform convolution or polynomial multiplication to these three vectors. With num2cell, I cannot call these cells for above required function.
Matt J
Matt J 2020년 6월 26일
Show me what you plan to do with B,C,D and I will show you how to accomplish ti with num2cell.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by