How do I merge squares

1 vue (au cours des 30 derniers jours)
abdullah al-dulaimi
abdullah al-dulaimi le 30 Oct 2022
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.

Réponse acceptée

KSSV
KSSV le 30 Oct 2022
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

Plus de réponses (1)

Atsushi Ueno
Atsushi Ueno le 30 Oct 2022
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]}

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by