error analysis with errbar function

8 views (last 30 days)
Somnath Kale
Somnath Kale on 20 Apr 2021
Commented: the cyclist on 20 Apr 2021
I want to plo the data with different errorbar. I have plot the data using following code but my all errorbars of same lenght. I want erroerbars with the different lenght and auto generted. what do I need to change in my code? I am plotting the standard error .
thanks in advance!
pulsewidth_5v = 1×10
20.0000 10.0000 4.0000 2.0000 1.0000 0.4167 0.2000 0.0952 0.0645 0.0323
diameter_5v = 1×10
0.3122 0.2924 0.2624 0.2475 0.2057 0.1977 0.1797 0.1723 0.1673 0.1400
% 5v data
N = length(diameter_5v);
err = std(diameter_5v)/sqrt(N)*ones(size(diameter_5v));
errorbar(pulsewidth_5v,diameter_5v,err,"mo");

Answers (1)

the cyclist
the cyclist on 20 Apr 2021
This section of the documentation explains how to control error bar length in all directions.
  6 Comments
Somnath Kale
Somnath Kale on 20 Apr 2021
That I understood, but calculating the errors in data set by some statistical normal distritibution using standard deviation is the general method. some peoples mentioned in the comment regarding some statistical toolbox do you have any idea about it?
the cyclist
the cyclist on 20 Apr 2021
Just because something is a common data analysis technique, does not make it right for your data. I strongly suspect it is not.
Can you explain your data a little bit more? For example is pulsewidth_5v an independent variable that you have control over, and diameter_5v is something you are measuring? In that case, perhaps you are looking for a model to fit a function to that relationship?
In that case your "error" would be the residual between the predicted diameter and the measure diameter.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!