How to select all rows of a given column in a cell array

135 ビュー (過去 30 日間)
Riccardo Tronconi
Riccardo Tronconi 2021 年 6 月 18 日
編集済み: the cyclist 2021 年 6 月 29 日
Hi guys! I m not able to select all values in a column of a cell array.
T= 3x1 cell where T{1}=mx6
I would select all rows in the 4th column.
Why this does not work?
T{1}{:,4}

採用された回答

the cyclist
the cyclist 2021 年 6 月 18 日
編集済み: the cyclist 2021 年 6 月 29 日
Your syntax:
T{1}{:,4}
would work if the contents of T{1} were also a cell array, since you would use the curly brackets to access it.
But that cell presumably just contains a regular numeric array, so you need
T{1}(:,4)
to access it, using parentheses instead of curly brackets.

その他の回答 (0 件)

カテゴリ

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