필터 지우기
필터 지우기

how to plot the mean of values from swept data

조회 수: 2 (최근 30일)
Em
Em 2020년 11월 17일
댓글: Em 2021년 1월 18일
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

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 11월 17일
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
Cris LaPierre
Cris LaPierre 2021년 1월 18일
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 2021년 1월 18일
This is exactly what I was looking for, thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by