numcoeffs - Number of coefficients of cfit or fittype object

Syntax

ncoeffs = numcoeffs(fun)

Description

ncoeffs = numcoeffs(fun) returns the number of coefficients ncoeffs of the cfit or fittype object fun.

Example

f = fittype('a*x^2+b*exp(n*x)');
ncoeffs = numcoeffs(f)
ncoeffs =
     3
coeffs = coeffnames(f)
coeffs = 
    'a'
    'b'
    'n'

See Also

fittype, formula, coeffnames

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS