1个回答
展开全部
%可以借助Curve Fitting Tool,fitresult就是拟合结果
[xData, yData, zData] = prepareSurfaceData( X1, X2, Y );
ft = fittype(['a*x^b*y^c'],'independent', {'x', 'y'}, 'dependent', 'z' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.StartPoint = ones(3,1);
[fitresult, gof] = fit( [xData, yData], zData, ft, opts );
[xData, yData, zData] = prepareSurfaceData( X1, X2, Y );
ft = fittype(['a*x^b*y^c'],'independent', {'x', 'y'}, 'dependent', 'z' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.StartPoint = ones(3,1);
[fitresult, gof] = fit( [xData, yData], zData, ft, opts );
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |