在MATLAB中找到隐式函数的根 [英] Find root of implicit function in MATLAB

查看:157
本文介绍了在MATLAB中找到隐式函数的根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个隐式函数,例如:

I have an implicit function, for example:

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

我想解决根问题。 所以f(x,y)= 0

绘制解决方案很简单:

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

但是,我希望将数据存储在图中,而不仅仅是视觉图。
那么我如何找到剧情的数据呢?也就是说,如何一旦获得一个图的数据OUT?

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? i.e., how to get data OUT of a plot once it is made?

推荐答案

如果您将输出参数提供给 ezplot ,它会给你一个线句柄。线句柄的一个属性是 XData YData 。要从线条提取数据,请使用 get

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');

这篇关于在MATLAB中找到隐式函数的根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆