Whats wrong in those equations?

1 次查看(过去 30 天)
x=(0:0.5:80);
y1=(0.02049/0.4)*x;
y2=(0.59*60/(1+(1.331/(sqrt(0.0631*x/(74.45-x)))^3)));
y3=(0.59*60/(1+(1.331/(sqrt(0.0631*x/(74.45-x)))^3)))-(0.02049/0.4)*x;
y4=(0.02049/0.4)*x-(0.59*60/(1+(1.331/(sqrt(0.0631*x/(74.45-x)))^3)));
figure
plot(x,y1,'r')
hold on
plot(x,y2,'c')
plot(x,y3,'g')
plot(x,y4,'b')
legend('y1','y2','y3','y4')
axis([0 80 0 3.5])
Hello Community,
I'm currently studying at the German Sport University Cologne and I'm an absolute newbie in Matlab. I need your help with those equations, Matlab gives me an Error using /
all I get is y1
Thank you very much!

采纳的回答

James Tursa
James Tursa 2016-12-23
Use element-wise operators (beginning with a dot) instead of matrix operators. E.g.,
y1=(0.02049/0.4)*x;
y2=(0.59*60./(1+(1.331./(sqrt(0.0631*x./(74.45-x))).^3)));
y3=(0.59*60./(1+(1.331./(sqrt(0.0631*x./(74.45-x))).^3)))-(0.02049/0.4)*x;
y4=(0.02049/0.4)*x-(0.59*60./(1+(1.331./(sqrt(0.0631*x./(74.45-x))).^3)));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by