Main Content

formula

Formula of cfit, sfit, or fittype object

Syntax

formula(fun)

Description

formula(fun) returns the formula of the cfit, sfit, or fittype object fun as a character array.

Examples

f = fittype('weibull');
formula(f)
ans =
a*b*x^(b-1)*exp(-a*x^b)

g = fittype('cubicspline');
formula(g)
ans =
piecewise polynomial

Version History

Introduced in R2006b