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

1 次查看(过去 30 天)
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,'-')
***.jpg
This is what my grpah looks like

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Errorbars 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by