Plot data from nested structure
Mostrar comentarios más antiguos
Hi.
I have a nested structure with multiple participants (n=17), multiple datasets, and multiple phases segmented out of each trial, ie:
metrics.sub(i).EDA(1,1) is the data for all participants for the mean of a time series from stage 1 for each participant.
There are six stages in each trial and I want to create a single figure with 6 boxplots comparing the mean of all participants across the 6 stages. So, this would be the data for each of the six boxplots:
metrics.sub(i).EDA(1,1);
metrics.sub(i).EDA(1,2);
metrics.sub(i).EDA(1,3);
metrics.sub(i).EDA(1,4);
metrics.sub(i).EDA(1,5);
metrics.sub(i).EDA(1,6);
I'm having trouble efficiently creating an array (or any other format the boxplot(x) will handle). Right now, my poor coding skills has me using four for loops for each metric and creating a new field in the structure for each phase of each trial. I need to create many of these plots.
Is there any way I can do this with a single for loop?
Sincerely,
Bungling in Connecticut
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Box Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

