メインコンテンツ

cfit

cfit オブジェクト用コンストラクター

説明

cfun = cfit(ffun, coeff1,...,coeffn) は、fittype オブジェクト ffun と係数値 coeff1coeff2 などで指定されたモデル タイプを使用して、cfit オブジェクト cfun を作成します。

メモ

fittype オブジェクトをデータに近似する場合、関数 fit によって cfit が呼び出されます。回帰の結果である cfit オブジェクトを作成するには、fit を使用します。

近似を "実行せずに" fittype オブジェクトの係数および問題のパラメーターに値を代入する場合は、cfit のみを直接呼び出さなければなりません。

Methods of cfit objects:

argnames Input argument names of cfit, sfit, or fittype object
categoryCategory of fit of cfit, sfit, or fittype object
cfitConstructor for cfit object
coeffnamesCoefficient names of cfit, sfit, or fittype object
coeffvaluesCoefficient values of cfit or sfit object
confintConfidence intervals for fit coefficients of cfit or sfit object
dependnamesDependent variable of cfit, sfit, or fittype object
differentiateDifferentiate cfit or sfit object
formulaFormula of cfit, sfit, or fittype object
indepnamesIndependent variable of cfit, sfit, or fittype object
integrateIntegrate cfit object
islinearDetermine if cfit, sfit, or fittype object is linear
numargsNumber of input arguments of cfit, sfit, or fittype object
numcoeffsNumber of coefficients of cfit, sfit, or fittype object
probnamesProblem-dependent parameter names of cfit, sfit, or fittype object
probvaluesProblem-dependent parameter values of cfit or sfit object
setoptions Set model fit options
typeName of cfit, sfit, or fittype object

すべて折りたたむ

fittype オブジェクトを作成し、関数 cfit を呼び出します。

f = fittype('a*x^2+b*exp(n*x)')
c = cfit(f,1,10.3,-1e2)
f =
     General model:
       f(a,b,n,x) = a*x^2+b*exp(n*x)
c =
     General model:
       c(x) = a*x^2+b*exp(n*x)
     Coefficients:
       a =           1
       b =        10.3
       n =        -100

入力引数

すべて折りたたむ

関数 cfitcfit オブジェクトの構築に使用するモデルタイプ。関数 fittype で構築された fittype として指定します。

例: fittype('poly2')

cfit オブジェクトの係数値。スカラーとして指定します。

データ型: single | double

出力引数

すべて折りたたむ

関数の出力。cfit オブジェクトとして返されます。

バージョン履歴

R2006a より前に導入