Help solving a equation system

조회 수: 2 (최근 30일)
Diego Vidaurre Villagomez
Diego Vidaurre Villagomez 2012년 3월 6일
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.

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by