Function not accepting all available x values

1 次查看(过去 30 天)
So I wrote a simple code to get a plot of a function
x = linspace(0,100,101);
y = 4*x.*(x+1) / (4*x.*(x+1) + (sin( 8*sqrt(x+1) )).^2)
plot(x,y);
and for some reason y only comes out as a single value
Is there any reason why this might be happening?

采纳的回答

Sulaymon Eshkabilov
y = 4*x.*(x+1) ./ (4*x.*(x+1) + (sin( 8*sqrt(x+1) )).^2);

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by