error analysis with errbar function
5 views (last 30 days)
Show older comments
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");
0 Comments
Answers (1)
the cyclist
on 20 Apr 2021
This section of the documentation explains how to control error bar length in all directions.
6 Comments
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.
See Also
Categories
Find more on Errorbars in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!