フィルターのクリア

Extract matrix from vector of .mat file

1 回表示 (過去 30 日間)
Ynne
Ynne 2018 年 1 月 8 日
編集済み: per isakson 2018 年 1 月 9 日
Dear all, According to the following code:
i=load('138078.mat')
i =
imageLabelCell: {1x6 cell}
subjectIDList: [1105 1107 1108 1112 1116 1124]
>> i.imageLabelCell
ans =
Columns 1 through 5
[481x321 double] [481x321 double] [481x321 double] [481x321 double] [481x321 double]
Column 6
[481x321 double]
I want to extract the 1st column of i.imageLabelCell which is a matrix 481x321 , Could anyone help me please ?

採用された回答

per isakson
per isakson 2018 年 1 月 8 日
Try
i.imageLabelCell{1}(:,1)
  2 件のコメント
Ynne
Ynne 2018 年 1 月 8 日
Great Thanks a lot :)
it is i.imageLabelCell{1}(:,:)
per isakson
per isakson 2018 年 1 月 9 日
編集済み: per isakson 2018 年 1 月 9 日
You write extract the 1st column of i.imageLabelCell which is a matrix 481x321 and it is i.imageLabelCell{1}(:,:) I'm missing something.
i.imageLabelCell has six cells each with one matrix. Thus there are altogether six 1st column. Maybe, you are looking for
cell2mat( cellfun( @(c) c(:,1), i.imageLabelCell, 'uni',false ) )
Matlab (R2016a) isn't smart enough to understand
>> [i.imageLabelCell{:}(:,1)]
Expected one output from a curly brace or dot indexing expression, but there were 3 results.
>>

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by