Filter löschen
Filter löschen

how to plot the mean of values from swept data

2 Ansichten (letzte 30 Tage)
Em
Em am 17 Nov. 2020
Kommentiert: Em am 18 Jan. 2021
Hi everyone,
I have a array of data where I ramped one variable and measured another a number of times. I would like to find the average of the independent variable at each data point in order to plot this. Does anyone have any suggestions on how I could do this?
Cheers!
Em

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 17 Nov. 2020
Sure. Use groupsummary. Your grouping variable is your dependent variable, your method is 'mean', and your datavar is your independent variable.
Take the results and plot.
  11 Kommentare
Cris LaPierre
Cris LaPierre am 18 Jan. 2021
Ok, values in the first column of G are duplicated because the grouping is by e07 then VarName1. It is the unique combinations of these 2 variables that creates a group. For example
e07 VarName1
_________ ________
-9.17e-07 -19.4
-9.17e-07 -14.2
It sounds like perhaps you just want to group by VarName1? The just do
G = groupsummary(acetone,"VarName1","mean")
Em
Em am 18 Jan. 2021
This is exactly what I was looking for, thank you!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by