How do I Plot error on a graph
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I want to plot an error on the below graph, a high error and a low error.
Note from the graph the least squares line, and the deviaiton aboce and below this line increasing along with the x-axis.
I have tried using errorbar(x,y,err) but i do not know how to calculate 'err' variable that is moving.
Any help would be greatly appreciated.

3 Commenti
Poongavanam Palani
il 1 Ago 2022
Have you tried Andrewsplot or boundedline package available in MATLAB repository. I am guessing it is the standard deviation that you are referring to here.
Link: http://www.mathworks.com/matlabcentral/fileexchange/27485-boundedline-m
Adam Danz
il 1 Ago 2022
Modificato: Adam Danz
il 1 Ago 2022
"Error" does not have a single definition. There are lots of ways to define error. Standard deviations, confidence intervals, quartiles, etc. You could show error along the x axis or y axis or variation of the fitted slope using cross validation etc. And the choice isn't arbitrary. The choice should be made based on the story you're telling with the data and the properties of your data. After you decide on what "error" means in your data, computing the error is relatively straight forward and plotting it is even easier, and you can get help with that here.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Errorbars in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!