How can I plot average and then the error bar with standard deviation?

Hi everyone, I should plot the average (Var 8) with standard deviation (Var7) as error bar.
plot(example_daily.Time(:,1),[example_daily.Var5(:,1), B, example_sd.Var7(:,1)]);
Can anyone help me kindly?
Thank you.

답변 (1개)

the cyclist
the cyclist 2021년 4월 27일

0 개 추천

You can use the errorbar function.

댓글 수: 5

Are you able to upload the data and code that created that plot?
Are you sure that you are using the MATLAB version of the errorbar function, and not some local user-defined function? What does
which errorbar -all
give as output?
Yes, I had no problem to plot them.
Here the plot (yellow--> average)
I'm using MATLAB 2021 a.
That is not what I meant.
Can you upload the data here, on this forum, using the INSERT tool. Then we can try to plot your errorbar chart.
And you did not answer my question, regarding the output of
which errorbar -all
It should point to a MATLAB directory such as
/Applications/MATLAB_R2020a.app/toolbox/matlab/specgraph/errorbar.m
and not a personal directory.
I'm sorry, I'm pretty new on the forum and matlab too, so I can't understand very well what you mean.
I attached my example in the question, so I thought it was okay...
I should plot a vertical error barr with standard deviation.
Thank you.
  1. Can you upload giulia_TT.mat ?
  2. Can you upload giulia_sd.mat ?
  3. What is the output of the command which errorbar -all ?

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

카테고리

도움말 센터File Exchange에서 Errorbars에 대해 자세히 알아보기

질문:

Pul
2021년 4월 27일

편집:

Pul
2021년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by