docxin
2008-10-12, 15:38
对于分段函数
f(x)=2*x/L (0<x<L/2)
=2*(L-x)/L (L/2<x<L) L=pi
如何用matlab表示:
>> syms x L
>> f=(2*x/L)*(0<x<L/2)+2*(L-x)/L*(L/2<x<L)
提示:
??? Error using ==> <
Function '<' is not defined for values of class 'sym'.
"<"在类sym中没有定义值,应该怎么写才正确?谢谢!!!
f(x)=2*x/L (0<x<L/2)
=2*(L-x)/L (L/2<x<L) L=pi
如何用matlab表示:
>> syms x L
>> f=(2*x/L)*(0<x<L/2)+2*(L-x)/L*(L/2<x<L)
提示:
??? Error using ==> <
Function '<' is not defined for values of class 'sym'.
"<"在类sym中没有定义值,应该怎么写才正确?谢谢!!!