How to calculate mean on data from cell array of 3D struct array?
Show older comments
I have cell array Data_output (dimensions 1x10), which contains 10 three-dimensional structures (dimension 7x6x2). Each element of this 7x6x2 structure array is a structure and the structure is same for all elements. I want to calculate mean value across columns of part of the structure Data_output{1}(:,6,1).dom_freq_PRSA_down where dom_freq_PRSA_down is in each structure matrix of freque
if true
mean(Data_output{1}(:,6,1).dom_freq_PRSA_down,1) % do not work, error
P1V6T10_allFiles = Data_output{1}(:,6,1).dom_freq_PRSA_down % does not retrieve all data
mean(P1V6T10_allFiles,1) % give not desired results, due to fact that it does not contain all data
endncies.
Firstly, i could not calculate mean(Data_output{1}(:,6,1).dom_freq_PRSA_down,1), i got error to many input arguments. Secondly, when i print Data_output{1}(:,6,1).dom_freq_PRSA_down it has much more rows than when i print P1V6T10_allFiles where P1V6T10_allFiles = Data_output{1}(:,6,1).dom_freq_PRSA_down. I can calculate mean(P1V6T10_allFiles,1) and it does not average across all values from Data_output{1}(:,6,1).dom_freq_PRSA_down so that is not what i need. Also, do you know how one can see what is the type of Data_output{1}(:,6,1).dom_freq_PRSA_down, is it a array, struct array, or something other
Thank you.
Do you have any suggestions what should i try?
3 Comments
Pawel Jastrzebski
on 21 Mar 2018
Could you please re-write your question using the formatting tools provided? Use 'code' for 'code' and bullet points for questions/explanation what you've done so far?

Jan
on 21 Mar 2018
@Pawel: The message does not contain code, so there is nothing to format here. I do not see a need for a bullet list also.
Milica Svasta
on 21 Mar 2018
Accepted Answer
More Answers (0)
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!