Second argument must be a vector of symbolic variables error
조회 수: 2 (최근 30일)
이전 댓글 표시
When trying to solve this equation system I get the error stated in the title
syms l1 l2 l3 H B phi gamma theta omega1 omega2 omega3 t
l1 = 0.12;
l2 = 0.29;
l3 = 0.157;
H = 0.15;
B = 0.238;
theta = (pi/900)*t;
eq3 = l1*cos(theta) + l2*cos(phi) - l3*sin(gamma) - H == 0
eq4 = B + l1*sin(theta) - l2*sin(phi) - l3*cos(gamma) == 0
sol1 = solve([eq3, eq4], [phi, gamma])
syms omega1 omega2 omega3 vA vB vC
omega1_v = [0 0 omega1]
omega2_v = [0 0 omega2]
omega3_v = [0 0 omega3]
AB = [l1*cos(theta) l1*sin(theta) 0]
BC = [l2*cos(phi) l2*sin(phi) 0]
CD = [l2*cos(gamma) l2*sin(gamma) 0]
eq5 = vB == cross(omega1_v, AB)
eq6 = vC == vB + cross(omega2_v, BC)
eq7 = 0 == vC + cross(omega3_v, CD)
sol2 = solve([eq5, eq6, eq7], [omega1_v, omega2_v, omega3_v])
How can I solve this?
댓글 수: 1
답변 (1개)
Walter Roberson
2023년 1월 15일
omega1_v = [0 0 omega1]
That is a vector that includes numeric values. You cannot solve for a numeric value. You should be asking to solve for omega1 not for omega1_v
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!