How do Index into a structure array and assign columns to a variable

I have what looks likes a structure array as output. Each cell of the structure array is n x 5. I wish to attract columns 2, 3, and 4 from each cell and assign them each to a variable.
However to be honest I merely wish to index into each cell, and assign each column to a variable.
These variables will then be inputs to another script. How do I index into each cell and assign columns 2, 3,and 4 to variables D, E, and F for example?

1 件のコメント

Kian Azami
Kian Azami 2017 年 10 月 8 日
Can you put a code of your structure or maybe a picture of your structure when it is opened in the workspace. It is hard to understand what you need to do?

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2017 年 10 月 8 日

0 投票

column2_of_each = cellfun(@(M) M(:,2), TheCellArray, 'Uniform', 0);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

製品

タグ

質問済み:

2017 年 10 月 8 日

回答済み:

2017 年 10 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by