Values of X where the function is between -0.5 and 0.5

11 次查看(过去 30 天)
Hello Everyone!
I have to find the range of x where the functions (legendreP(2:10, x)) is between -0.5 and 0.5.
I have the code below I only have to get the range of x.
syms x y
y1=0.5;
y2=-0.5;
plot(y1)
fplot(legendreP(2:10, x))
axis([-1.5 1.5 -1 1])
grid on
ylabel('P_n(x)')
title('Legendre polynomials of degrees 2 through 10')
legend('2','3','4','5','6','7','8','9','10','Location','best')

回答(1 个)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020-11-16
syms x y
fplot(legendreP(2:10, x), [-.5, .5]);
axis([-0.5 0.5 -.5 .5])
  1 个评论
M G
M G 2020-11-16
Thank you for your response. But that is not what I meant. I want the values of x when -0.5<y<0.5.

请先登录,再进行评论。

类别

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

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by