フィルターのクリア

curve fit for 4 variables, error 'not enough input arguments'

2 ビュー (過去 30 日間)
Wu Ying
Wu Ying 2015 年 7 月 5 日
コメント済み: Geoff Hayes 2015 年 7 月 5 日
function [fitresult, gof] = createFit(CO2NonWorkZone, diveIRI, CO2WorkZone,diffeIRI)
[xData, yData, zData, gData] = prepareData( CO2NonWorkZone, diveIRI, CO2WorkZone, diffeIRI );
ft = fittype( 'a + c*x*g*exp(w*y)', 'independent', {'x', 'y','g'}, 'dependent', 'z' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.StartPoint = [0.371420685802539 0.0606895470210004 0.376869074010979];
% Fit model to data.
[fitresult, gof] = fit( [xData, yData, gData], zData, ft, opts );
figure( 'Name', 'untitled fit 1' );
h = plot( fitresult, [xData, yData, gData], zData );
legend( h, 'untitled fit 1', 'CO2WorkZone vs. CO2NonWorkZone, diveIRI, diffeIRI', 'Location', 'NorthEast' );
xlabel( 'CO2NonWorkZone' );
ylabel( 'diveIRI' );
zlabel( 'CO2WorkZone' );
glabel( 'diffeIRI' );
grid on
  1 件のコメント
Geoff Hayes
Geoff Hayes 2015 年 7 月 5 日
Wu - please include the full error message (all text that is in red) so that we can get an idea of which line is generating the error message. Is it the call to createFit? Also, is this function the one from the File Exchange at here?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by