How to plot a linear fit (or Ordinary Least Squares)?

Hi, I have to analyze some data and put them in a graphics.
I have a matrix with the mean and another one (with the same size) of the standard deviation.
Each matrix is 6x21. I want to plot 6 different curvers of the mean with a line for the standard deviation, something like that:
But with 6 curves in the same plot (Each row of the matrix will be a curve of the graph).
How can I do it?

3 Comments

Looks like what errorbar will do. You can change the NextPlot property with the hold function.
How? Can you give me the code?
Sure:
doc errorbar
doc hold
Have a read here and here as well.

Answers (0)

This question is closed.

Products

Release

R2020b

Asked:

on 6 Oct 2021

Closed:

Rik
on 6 Oct 2021

Community Treasure Hunt

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

Start Hunting!