|
clear
syms R1 R2 m h; %定义X,R1,R2,折叠角h,m
f1=1/6*(R1^2+R2^2+2*R1*R2*cos(h))^(1/2)*(-3*R1^2*(cos(h))^2+2*R1^2+R1*R2*cos(h)+2*R2^2)
f2=log((R2+R1*cos(h)+(R1^2+R2^2+2*R1*R2*cos(h))^(1/2))*(R1^3*cos(h)/2-R1^3*(cos(h))^3/2))
f3=1/6*R1*(-3*R1^2*(cos(h))^2+2*R1^2)
f4=log((R1*cos(h)+R1)*(R1^3*cos(h)/2-R1^3*(cos(h))^3/2))
f=m*(f1-f2-f3+f4)
f=subs(f,[R1,R2,m],[2,5,3])
hold on
h=0:0.1:2*pi
plot(h,f)
出现错误,小白请教各路大神,怎么办 |
|