T=
1 2
3 4
5 6
Result =
[1,2]
[3,4]
[5,6]
I want to get the result,
result will be one coluom.

 채택된 답변

KSSV
KSSV 2022년 10월 30일

1 개 추천

T= [1 2
3 4
5 6] ;
iwant = num2cell(T,2) ;
iwant{1}
ans = 1×2
1 2
iwant{2}
ans = 1×2
3 4

추가 답변 (1개)

Atsushi Ueno
Atsushi Ueno 2022년 10월 30일

0 개 추천

It can be achieved by cell array.
T = {[1,2];[3,4];[5,6]}
T = 3×1 cell array
{[1 2]} {[3 4]} {[5 6]}

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

질문:

2022년 10월 30일

답변:

2022년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by