Fitting multiple planes- multiple regression
显示 更早的评论
Hi, I am trying to write a program to fit few planes to 3D data using multiple linear regression. Each plane would be best-fitted to a set of 3D data-points saved in single 2D array (x,y)=z, where x,y are X,Y coordinates in 2D Coordinate system and z is the height value in space. I would have a few of 2D arrays containing points, therefore few planes would have to be fitted in. The function computing regression would have to accept as input the list of 2D arrays: function [out1, out2, ...] = myfunction_multtiple_planar_fit(Input1_2D_array_1, Input2_2D_array_2, Input3_2D_array_3, ...) and also - Fit a plane to each array - Plot all data points and fitted planes on the same 3D-plot - Return plane equation for each fitted plane - Return centroid of each fitted plane (x,y coordinates and z [height] value)
I would more than grateful for your help!
Best wishes and many thanks, Robert
回答(1 个)
Sean de Wolski
2012-1-4
If you have the Curve Fitting Toolbox, take a look at the surface fitting tool.
doc sftool %gui - fancy and fun
and
doc sfit
类别
在 帮助中心 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!