I have 10 data points for 5 different trial, and when I would like to get a best fit line using polyfit and errorbars on data points. However, I get a matrix demenssion error. How can I account for this to execute these commands
2 views (last 30 days)
Show older comments
Hwater = 20.574;
IPH = 1./(Hwater + data.heights);
%plot (IPH(1:5),data.flowrates(1:5),'ob')
plot (IPH(1:5), data.flowrates(1:5,2:10),'ro')
hold on
errorbar(IPH(1:5),data.flowrates(1:5),errQ(1:5),'go')
D1=IPH(1:5);
R1=data.flowrates(1:5,2:10);
H=polyfit(D1,R1,1);
G=polyval(H,D1);
plot(IPH(1:5),G,'-')
This is what my grpah looks like
0 Comments
Answers (0)
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!