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

7 views (last 30 days)
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')

Answers (1)

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

Sign in to comment.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!