フィルターのクリア

How do I merge squares

2 ビュー (過去 30 日間)
abdullah al-dulaimi
abdullah al-dulaimi 2022 年 10 月 30 日
回答済み: Atsushi Ueno 2022 年 10 月 30 日
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 日
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 日
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]}

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by