%%% I want to solve these symbolic functions getting a expression of se(i1) =============================================================================== >> eq1='s3*sin(i3)-l1*sin(i1)-a=0'; >> eq2='s3*cos(i3)-l1*cos(i1)=0'; >> eq3='l3*sin(i3)-l4*sin(i4)-b=0'; >> eq4='l3*cos(i3)-l4*cos(i4)-se=0'; >> [se,s3,i3,i4]=solve(eq1,eq2,eq3,eq4) %%% But the result is not my expectation ======================================================================================== se =
(a*cos(i3))/(cos(i1)*sin(i3) - cos(i3)*sin(i1))
%%% I can use eq1 and eq2 to constitute eq0,then I can get the expression of i3(i1)._ ======================================================================================= >> eq0='tan(i3)-(l1*sin(i1)-a)/(l1*cos(i1))';
>> s=solve(eq0,'i3')
s =
-atan(1/l1/cos(i1)*(a - l1*sin(i1))) ========================================================================================%%% a=0.27 l1=0.859 i1[-pi/10:pi/18:1.98pi] so I replaced symbols of the function,but I found the result is not correct,when I compare the result to the answer of my teacher(the figure of se(i1) should be a curve not a straight line ). =============================================================================== >> se=subs(se,'i3',s)
se =
-a/(((a - l1*sin(i1))^2/(l1^2*cos(i1)^2) + 1)^(1/2)*(sin(i1)/((a - l1*sin(i1))^2/(l1^2*cos(i1)^2) + 1)^(1/2) + (a - l1*sin(i1))/(l1*((a - l1*sin(i1))^2/(l1^2*cos(i1)^2) + 1)^(1/2))))
>> simplify(se)
ans =-l1
>> se=subs(se,'a',0.27)
se =
-27/(100*((l1*sin(i1) - 27/100)^2/(l1^2*cos(i1)^2) + 1)^(1/2)*(sin(i1)/((l1*sin(i1) - 27/100)^2/(l1^2*cos(i1)^2) + 1)^(1/2) - (l1*sin(i1) - 27/100)/(l1*((l1*sin(i1) - 27/100)^2/(l1^2*cos(i1)^2) + 1)^(1/2))))
>> se=subs(se,'l1',0.859)
se =
27/(100*((1000*((859*sin(i1))/1000 - 27/100))/(859*((1000000*((859*sin(i1))/1000 - 27/100)^2)/(737881*cos(i1)^2) + 1)^(1/2)) - sin(i1)/((1000000*((859*sin(i1))/1000 - 27/100)^2)/(737881*cos(i1)^2) + 1)^(1/2))*((1000000*((859*sin(i1))/1000 - 27/100)^2)/(737881*cos(i1)^2) + 1)^(1/2))
>> i1=[-pi/10:pi/18:1.9*pi];
>> ezplot(se)