syms Ax Ay Dx Dy Md F M R
syms a b c tht
% slotted arm
A = [0,0,0]; B = [a*cos(tht),a*sin(tht),0];
rAB = B-A;
FA = [Ax,Ay,0]; MA = [0,0,-M]; FR = [R*sin(tht),-R*cos(tht),0];
sumF = FA + FR
sumMA = MA + cross(rAB,FR)
sol1 = solve(sumF(1),sumF(2),sumMA(3),Ax,Ay,R)

댓글 수: 3

John D'Errico
John D'Errico 2016년 3월 9일
What is the problem? Did it give an error? If so, then report the error. Did it give a result that you think to be suspect? Why do you think so? Tell us what you think is wrong.
Panchapakesan Venkataraman
Panchapakesan Venkataraman 2016년 3월 9일
편집: Walter Roberson 2016년 3월 9일
I apologize:
I have this error:
Error using mupadengine/feval (line 157)
MuPAD error: Error: Invalid variable to solve for. [solve]
Error in solve (line 170)
sol = eng.feval('symobj::solvefull',eqns,vars);
Error in Ex_6_8_Frame2Dm (line 23)
sol1 = solve(sumF(1),sumF(2),sumMA(3),Ax,Ay,R)
In my previous use of solve it would return a solution in terms of the other variables, that is M and a.
I cannot find the error and I have searched on the internet. I am using ver 2014a.
Thanks
Venkat
Sarah Palfreyman
Sarah Palfreyman 2016년 3월 21일
편집: Sarah Palfreyman 2016년 3월 21일
It seems fine in the Live Editor in R2016a. If you are having an issue please do contact Technical Support at support@mathworks.com

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 3월 9일

0 개 추천

Use simplify() on the results.

태그

편집:

2016년 3월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by