Standard deviation between two vector

17 views (last 30 days)
Hi there,
Can anybody help me to find out standard deviation between two vector? first vector shows data points and other vector shows fitting curve for it. I want to see based on std which curve fitting function has best fit
68.3306790117463 68.0583000000000
69.7661166036220 69.7895000000000
72.1123677003504 71.5207000000000
73.0939315719700 73.2519000000000
73.9225823385832 74.9831000000000
76.4566931111904 76.7143000000000
77.5042095769199 78.4455000000000
78.8703468364576 80.1767000000000
81.7629172086221 81.9079000000000
84.5119789972035 83.6391000000000
85.6904259495530 85.3703000000000
86.9839371938436 87.1015000000000
88.1731382924858 88.8327000000000
88.5525994121150 90.5639000000000
93.3274107768681 92.2951000000000
94.3898044222140 94.0263000000000
96.4532553644749 95.7575000000000
98.6474654885060 97.4887000000000
99.9741525141648 99.2199000000000
101.980636557984 100.951100000000
104.675296906708 102.682300000000
106.750596607465 104.413500000000
106.199133595364 106.144700000000
108.657750373732 107.875900000000
109.234571173461 109.607100000000
109.976002830055 111.338300000000
111.845164723014 113.069500000000
114.282169520428 114.800700000000
114.789373580927 116.531900000000
117.538189964372 118.263100000000
119.854576650875 119.994300000000
122.247310933277 121.725500000000
Thank you in advance to all

Accepted Answer

Star Strider
Star Strider on 17 Dec 2019
I suspect that what you want are confidence intervals for the fitted regression line, since ‘standard deviation’ does not make sense in this context. Without the independent variable (x) data, it is not possible for me to do it.
With your original (x,y) data, use the fitlm function to repeat the fit, then use the predict function to create the confidence intervals. Plotting the confidence limits as lines is then straightforward. You can also use the errorbar function to plot the error bars at each point on the regression line as an alternative.
  6 Comments
Ill ch
Ill ch on 18 Dec 2019
Hello Star,
Could you please help me for the following problem? Thank you very very very much in advance

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!