How do I convert a 3x1 cell to a 1x3
68 ビュー (過去 30 日間)
古いコメントを表示
I have a 1x3 cell, or and need to change this to a 3x1.
How do I do this??
0 件のコメント
回答 (2 件)
Mouhamed Niasse
2021 年 6 月 24 日
Hello,
In case it's a cell array, just transpose it. For example:
>> A={14; 2; 4}
A =
3×1 cell array
{[14]}
{[ 2]}
{[ 4]}
>> A=A'
A =
1×3 cell array
{[14]} {[2]} {[4]}
0 件のコメント
millercommamatt
2021 年 6 月 24 日
The transposition operator will work.
a={1,2,3}; % 1x3 cell
a = a'; % a now a 3x1 cell
a = a'; % a is a 1x3 cell again
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!