Clear Filters
Clear Filters

Whats wrong in those equations?

1 view (last 30 days)
Mo_B
Mo_B on 23 Dec 2016
Answered: James Tursa on 23 Dec 2016
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!

Accepted Answer

James Tursa
James Tursa on 23 Dec 2016
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)));

More Answers (0)

Categories

Find more on Printing and Saving 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!