indepnames - Independent variable of cfit or fittype object

Syntax

indep = indepnames(fun)

Description

indep = indepnames(fun) returns the (single) independent variable name of the cfit or fittype object fun as a 1-by-1 cell array of strings indep.

Example

f1 = fittype('a*x^2+b*exp(n*x)');
indep1 = indepnames(f1)
indep1 = 
    'x'

f2 = fittype('a*x^2+b*exp(n*x)','independent','n');
indep2 = indepnames(f2)
indep2 = 
    'n'

See Also

dependnames, fittype, formula

  


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