Why is this code returning values of zero?

Im trying to use loop closure to analyze a mechanism. So I have equations that describe the motion, however when I try to solve the system of equations the returning values are just zero and I'm not sure why. If anyone could help I would greatly appreciate it!
clear;
clc;
% Known parameters
r1=0.15;
r2=0.125;
r3=0.15;
r4=0.054;
theta1=0.4811;
theta2=-0.1366;
theta3=pi;
theta4=pi/2;
syms thetadot1 thetadot2 rdot4 theta1dd theta2dd r4dd
% Equations
L1post = r1*exp(1i*theta1)+ r2*exp(1i*theta2) + r3*exp(1i*theta3) +r4*exp(1i*theta4)==0;
L1vel = 1i*thetadot1*r1*exp(1i*theta1) + 1i*thetadot2*r2*exp(1i*theta2) + rdot4*exp(1i*theta4)==0;
L1accel = 1i*theta1dd*r1*exp(1i*theta1) - thetadot1^2*r1*exp(1i*theta1)+1i*theta2dd*r2*exp(1i*theta2)+r4dd*exp(1i*theta4)==0;
eqns=[L1post,L1vel,L1accel];
vars = [thetadot1 thetadot2 rdot4 theta1dd theta2dd r4dd];
y=solve(eqns,vars)
y.thetadot1
y.thetadot2
y.rdot4
y.theta1dd
y.theta2dd
y.r4dd

Réponses (1)

John D'Errico
John D'Errico le 2 Déc 2018
Modifié(e) : John D'Errico le 2 Déc 2018

0 votes

Does zero for all variables trivially satisfy the equations? (Yes.)
Did you request a solution of the equations? (Yes.)
Do you know that non-trivial solutions exist? (Not at all clear. In fact, if I arbitrarily constrain one of the parameters to be strictly positive for example, no solution at all seems to be found. While that does not mean no non-trivial solution exists, it suggests the idea as something you should consider.)

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by