将这个表达式输入到matlab,怎么写c=(l^2/2*(sin(a)-a*cos(a))-r^2*(2/3*sin(a)^3+cos(a)^2*sin(a)-a*cos(a)))/(2*r*a*(1+2*cos(a)^2)-3*r*cos(a)*sin(a))出现提示Error:Incomplete or misformed expression or statement.
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 07:53:49
将这个表达式输入到matlab,怎么写c=(l^2/2*(sin(a)-a*cos(a))-r^2*(2/3*sin(a)^3+cos(a)^2*sin(a)-a*cos(a)))/(2*r*a*(1+2*cos(a)^2)-3*r*cos(a)*sin(a))出现提示Error:Incomplete or misformed expression or statement.
将这个表达式输入到matlab,怎么写
c=(l^2/2*(sin(a)-a*cos(a))-r^2*(2/3*sin(a)^3+cos(a)^2*sin(a)-a*cos(a)))/(2*r*a*(1+2*cos(a)^2)-3*r*cos(a)*sin(a))
出现提示Error:Incomplete or misformed expression or statement.
将这个表达式输入到matlab,怎么写c=(l^2/2*(sin(a)-a*cos(a))-r^2*(2/3*sin(a)^3+cos(a)^2*sin(a)-a*cos(a)))/(2*r*a*(1+2*cos(a)^2)-3*r*cos(a)*sin(a))出现提示Error:Incomplete or misformed expression or statement.
>> syms l a r
>> c=(l^2/2*(sin(a)-a*cos(a))-r^2*(2/3*sin(a)^3+cos(a)^2*sin(a)-a*cos(a)))/(2*r*a*(1+2*cos(a)^2)-3*r*cos(a)*sin(a))
c =
-(r^2*(cos(a)^2*sin(a) - a*cos(a) + (2*sin(a)^3)/3) - (l^2*(sin(a) - a*cos(a)))/2)/(2*a*r*(2*cos(a)^2 + 1) - 3*r*cos(a)*sin(a))