Matlab平面拟合-无法获得均方根误差
我需要找到一组3D点的平面拟合的RMS(均方根)误差。我正在使用这个函数,但是我得到了一个索引数组作为结果 我的代码:Matlab平面拟合-无法获得均方根误差,matlab,data-fitting,Matlab,Data Fitting,我需要找到一组3D点的平面拟合的RMS(均方根)误差。我正在使用这个函数,但是我得到了一个索引数组作为结果 我的代码: % Create the point cloud object % XYZ is a N by 3 matrix containing the points ptCloud = pointCloud(XYZ); [~,rmse] = pcfitplane(ptCloud,maxDistance); % rmse is a 1 by N array, and the value
% Create the point cloud object
% XYZ is a N by 3 matrix containing the points
ptCloud = pointCloud(XYZ);
[~,rmse] = pcfitplane(ptCloud,maxDistance);
% rmse is a 1 by N array, and the values are also from 1 to N!
我错过了什么?如何正确获取RMS错误?您没有正确解释错误。以下是原型的显示方式:
[model,inlierIndices,outlierIndices] = pcfitplane(ptCloudIn,maxDistance)
[___,rmse] = pcfitplane(ptCloudIn,maxDistance)
[___] = pcfitplane(ptCloudIn,maxDistance,Name,Value)
长的三重下划线表示“上面显示的Sytax的所有输出参数”,而不是“一个参数”。正如您正确地注意到的,您正在返回inlierIndex
。您正在尝试这样做:
[~,~,~,rmse] = pcfitplane(ptCloud,maxDistance);
三个波浪线是长下划线。它们表示
模型、内部索引、异常值索引
。希望这也能帮助您处理未来的文档。哦!这就是我错过的!非常感谢。是 啊很高兴你在发帖前能非常清楚地阅读和理解这些文档。出人意料的是,这种情况很少发生。