MATLAB CODE FOR PLOTTING WON'T DISPLAY A LINE

2 次查看(过去 30 天)
I'M trying to plot a line/graph for y=(R (H.* x.^2.* Beta.^2 - Beta.*x + x .*Beta.* (2 - H .*Beta.*x)))/(K (1 +
H .*x .*Beta).^2).
here are my codes
x=[0:0.002:2];
R=0.12;
betta=2.623;
H=0.2;
K=0.5;
y=(R.*(H.*x.^2.*betta.^2-betta.*x+x.*betta.*(2-H.*betta.*x)))/(K.*(1+H.*x.*betta)).^2;
plot(x,y,'b-')
grid on

采纳的回答

Arif Hoq
Arif Hoq 2022-3-16
try this:
x=[0:0.002:2];
R=0.12;
betta=2.623;
H=0.2;
K=0.5;
y=(R.*(H.*x.^2.*betta.^2-betta.*x+x.*betta.*(2-H.*betta.*x)))/(K.*(1+H.*x.*betta)).^2;
plot(x,y,'*')
grid on
  2 个评论
Arif Hoq
Arif Hoq 2022-3-16
or
x=[0:0.002:2];
R=0.12;
betta=2.623;
H=0.2;
K=0.5;
y=(R.*(H.*x.^2.*betta.^2-betta.*x+x.*betta.*(2-H.*betta.*x)))/(K.*(1+H.*x.*betta)).^2;
plot(y,'o')
grid on

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by