简体   繁体   中英

Find root of implicit function in MATLAB

I have an implicit function, for example:

f(x,y) = x.^3 + x.*y + y.^2 - 36

I want to solve the root. So f(x,y) = 0 .

Drawing the solution is easy:

ezplot('x.^3 + x.*y + y.^2 - 36',[-10 10 -10 10]);

However, I would like to have the data that is in the plot and not only the visual plot. So how do I find the data of the plot? ie, how to get data OUT of a plot once it is made?

If you supply an output argument to ezplot , it will give you a line handle . One of the properties of line handles is XData and YData . To extract data from the line handles, use get :

LH = ezplot('x.^3 + x.*y + y.^2 - 36',[-10 10 -10 10]);
XData = get(LH, 'XData');
YData = get(LH, 'YData');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM