islinear
确定cfit
,sfit
,或fittype
对象是线性的
语法
旗帜= islinear(有趣)
描述
旗帜= islinear(有趣)
返回一个国旗
的1
如果cfit
,sfit
,或fittype
对象有趣的
表示线性模型,而国旗
的0
如果没有。
例子
f = fittype('a*x+b') f =一般模型:f(a,b,x) = a*x+b g = fittype({'x','1'}) g =线性模型:g(a,b,x) = a*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
另请参阅
在R2006b中引入