简体   繁体   English

在Matlab中从3D冲浪图生成方程式

[英]Generate Equation from 3D surf Plot in Matlab

I am wondering if anyone knows (or is it possible?) how to generate a trend equation from a 3D surf plot from Matlab? 我想知道是否有人知道(或有可能吗?)如何从Matlab的3D冲浪图中生成趋势方程? I understand that we can create trendline for 2D plots (linear and nonlinear) and show its equation, but how about 3D plot? 我知道我们可以为2D图(线性和非线性)创建趋势线并显示其方程,但是3D图又如何呢? Can we create something like: 我们可以创建类似以下内容的东西吗?

z = ax + by? z =轴+乘以?

Regards Kit 问候套件

If you have the curve fitting toolbox you can fit 3D surfaces using cftool as described here . 如果你有曲线拟合工具箱可以作为描述使用cftool适应三维曲面这里

Here's an example: 这是一个例子:

[X,Y] = meshgrid(1:100,1:100);
X = reshape(X,numel(X),1);
Y = reshape(Y,numel(Y),1);
Z = 3*X+4*Y;
plot3(X,Y,Z)

f = fit([X, Y], Z, 'poly11');
coeffvalues(f)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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