确定cfit
,sfit
,或fittype
对象是线性的
国旗= islinear(有趣)
国旗= islinear(有趣)
返回一个国旗
的1
如果cfit
,sfit
,或fittype
对象有趣的
表示线性模型,a国旗
的0
如果没有。
f = fittype (a * x + b) f =一般模型:f (a, b, x) = * x + b g = fittype ({' x ', ' 1 '}) g =线性模型:g (a, b, x) = * x + b h = fittype(“poly1”)h =线性模型poly1: h (p1, p2, x) = p1 * x + p2 islinear (f) ans = 0 islinear (g) ans = 1 islinear (h) ans = 1