I'm trying to understand why the output of the following is giving me a 4x1 matrix for the desired solutions. There should only be one discrete value for a1, a2, p1, p2.
t=0;
syms a1 a2 p1 p2
x1=(-1/3)+a1*(1/3)*sin(sqrt(2)*t+p1)-a2*(1/3)*sin(2*t+p2);
x2=-1+a1*sin(sqrt(2)*t+p1)+a2*sin(2*t+p2);
v1=a1*(1/3)*sqrt(2)*cos(sqrt(2)*t+p1)-a2*(1/3)*2*cos(2*t+p2);
v2=a1*sqrt(2)*cos(sqrt(2)*t+p1)+a2*2*cos(2*t+p2);
soln=solve(x1,x2,v1,v2);
soln.a1
soln.a2
soln.p1
soln.p2
I have found the solutions by other means which are a1=1, a2=0, p1=pi/2, p2=pi/2. The answers matlab is returning is:
ans =
-1
1
-1
1
ans =
0
0
0
0
ans =
-pi/2
pi/2
-pi/2
pi/2
ans =
pi
pi
0
0
Any help would be appreciated.
TY