The script i wrote is
But i get these error
R =
root(z^4 + 2*z^2 - 5*z + 1, z, 1)
root(z^4 + 2*z^2 - 5*z + 1, z, 2)
root(z^4 + 2*z^2 - 5*z + 1, z, 3)
root(z^4 + 2*z^2 - 5*z + 1, z, 4)
Error using symengine
Unable to prove 'imag(root(z^4 + 2*z^2 - 5*z + 1, z, 1)) == 0 & 0 < real(root(z^4 + 2*z^2 - 5*z + 1, z, 1)) & real(root(z^4 + 2*z^2
- 5*z + 1, z, 1)) < 2' literally. Use 'isAlways' to test the statement mathematically.
Error in sym/subsindex (line 949)
X = find(mupadmex('symobj::logical',A.s,9)) - 1;
Error in sym/subsref (line 997)
R_tilde = builtin('subsref',L_tilde,Idx);
Error in exp_lmvt (line 14)
S=R(imag(R)==0&real(R)>a&real(R)<b)
f(x)=input('Enter the function')
a=input('Enter the left endpoint')
b=input('Enter the right endpoint')
S=R(imag(R)==0&real(R)>a&real(R)<b)
plot(a,f(a),'.','MarkerSize',25)
plot(b,f(b),'.','MarkerSize',25)
plot(S,f(S),'.','MarkerSize',25)