ezplot: A same function with different plots!

Hello all,
I am plotting a function in terms of a parameter (which is 'k' here).
When I give [-5,5] as the domain of k, the output is as follows:
As you see, there are solutions for k=[-3,-5]. But when I change the domain from [-50,50], then there is no solution for negative values of k's (the left-hand side of the diagram is empty):
As you see even for k=[-3,-5], nothing is plotted.
My code is as follows:
syms w
syms k
a=1
b=1
c=1
d=1
e=2
f=4
g=1
h=1
m=10
n=12
t=30
p=1
y=(-(w*(c*f+d*e))/(4*p*w-t*w+n*w+g*f))^(k+1)+(-(w*(a*f+h*e))/(4*p*w-t*w+m*w+g*f))^(k+1)-((b*w*e)/(2*p*w-t*w+m*w+n*w+g*f))^(k+1)+w^(k+1)
ezplot(y,[-5,5]) --------- Or -------> ezplot(y,[-50,50])
Would you please tell me the reason? How can I solve it?

Answers (1)

the cyclist
the cyclist on 4 Jun 2016
Edited: the cyclist on 4 Jun 2016
I think it will be helpful for you to read my answer -- and more importantly John D'Errico's comments -- on this similar question about ezplot.
The gist is that ezplot is finding contours, and can't always do it optimally over disparate ranges.

1 Comment

Thank you so much. So, do you know any other function instead of 'ezplot' that can provide a more precise and continuous diagram of this function?

Sign in to comment.

Tags

Asked:

on 4 Jun 2016

Commented:

on 4 Jun 2016

Community Treasure Hunt

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

Start Hunting!