max value of a cell array

Hi, I have the attached 8x7 cell, inside a structure (data.file_1.max). I would like to get the maximum value of the ones on the 8x7 cell, and do this for several "files" in the structure (data.file_2.max, data.file_3.max, data.file_4.max).
I get an error when trying to use max for cells. I tried using cell2mat first, but it's not working for some reason (maybe because there are cells without values?).
Thanks

回答 (1 件)

dbmn
dbmn 2016 年 9 月 30 日

0 投票

max([ans{:, :}])
... you could use this together with structfun

カテゴリ

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

質問済み:

2016 年 9 月 30 日

回答済み:

2016 年 9 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by