フィルターのクリア

Extract data from multidimensional cell array

2 ビュー (過去 30 日間)
Esra Kaya
Esra Kaya 2016 年 8 月 3 日
回答済み: Esra Kaya 2016 年 8 月 4 日
In a for loop, I made some calculations and obtained a 50x1 cell array and every cell has :x9 matrices. object count being ':' means it is changeable. 9 is the number of properties and I want to calculate the mean value of every property. I could not take the data from the cell array. Can you please help me? Thanks in advance.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 3 日
編集済み: Azzi Abdelmalek 2016 年 8 月 3 日
yourcellarray=arrayfun(@(x) randi(10,randi(20),9),1:50,'un',0) %--Example-----
out=cellfun(@(x) mean(x,2),yourcellarray,'un',0)

その他の回答 (1 件)

Esra Kaya
Esra Kaya 2016 年 8 月 4 日
Thank you for your answer. Although I have more questions coming.
I want to compare every object property with mean values but for cell matlab does not accept @le and @ge functions. Also, while I use the repmat function to compare the mean vector with my cellarray, I have to use <= and >= but matlab does not accept them for cells again. What can I do?

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by