This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Independent variable of cfit, sfit, or fittype object


indep = indepnames(fun)


indep = indepnames(fun) returns the independent variable name or names (indep) of the cfit, sfit, or fittype object fun. For curves indep is a 1-by-1 cell array of character vectors, and for surfaces indep is a 2-by-1 cell array of character vectors.


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

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

Introduced in R2006b