I wish to plot implicit functions in MATLAB. Like x^3 + xy + y^2 = 36 , equations which cannot be made into simple parametric form. Is there any simple method ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here are a couple of options…
Using
ezplot(orfplotrecommended in newer versions):The easiest solution is to use the function
ezplot:Which gives you the following plot:
Using
contour:Another option is to generate a set of points where you will evaluate the function
f(x,y) = x^3 + x*y + y^2and then use the functioncontourto plot contour lines wheref(x,y)is equal to 36:The above will give you a plot nearly identical to the one generated by
ezplot: