Help solving a equation system

2 views (last 30 days)
Diego Vidaurre Villagomez
Hello to everyone,
I'm kind of new with matlab and i've been trying to solve a system of equations for a trajectory planning algorithm.
What I need is to get the value of the variables "a13, a14, a21, a22, a23, an3 and an4" in connection with this next variables.
I have Y=C*X where:
y=[d1-a0*t1^2/2-v0*t1; -a0*t1-v0; -a0; d2; -af*tn+vf; af; dn+af*tn^2/2-vf*tn]
c=[1 1 0 0 0 0 0;3/t1 4/t1 -1/t2 0 0 0 0; 6/(t1^2) 12/(t1^2) 0 -2/(t2^2) 0 0 0; 0 0 1 1 1 0 0; 0 0 1/t2 2/t2 3/t2 -3/tn 4/tn; 0 0 0 2/(t2^2) 6/(t2^2) 6/(tn^2) -12/(tn^2); 0 0 0 0 0 1 -1]
x=[a13;a14;a21;a23;an3;an4]
As you can see the X matrix is where all the variables i need are, what i dont quite undestand is how can i get the variables from the equations. Ive tried the 'solve' function already but i keep getting an error of dimension even though the equations are well balanced.
I hope someone can help me with this problem.
Thank you in advance, any help is appreciated.

Answers (1)

Walter Roberson
Walter Roberson on 6 Mar 2012
Observe that
X = inv(C) * Y
but then read the mldivide documentation and use the \ operator instead of inv()

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!