Extracting the same column in a cell array for anova
Show older comments
Hi, I currently have a 1 x 8 cell (attached) and would like to extract the same column in every double and run an anova1 on them - eg 1st column in the 41 x 6 double, 1st column in the 80 x 6 double .... (total of 8 groups). May I know how I may do so?
Thank you, any help is much appreciated.
Accepted Answer
More Answers (1)
Walter Roberson
on 24 Oct 2019
col_to_extract = 1;
the_columns_as_cells = cellfun(@(C) C(:,col_to_extract), YourCellArray, 'uniform', 0);
You cannot, however, combine these into a single something-by-8 numeric array, as the cells have different numbers of rows.
Categories
Find more on Analysis of Variance and Covariance 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!