Solve function is only returning one solution
Show older comments
I am trying to solve a system of 4 equations and 4 unknowns using the matlab solve function. I know that there are several solutions to this system of equations and I need to know more than just the one that is being returned.
syms th13 th14 th15 th16_1 th16_2 w13 w14 w15 w16 a13 a14 a15 a16
r8_4 = 1.8954067;
th8_4 = 105.9929731;
r9_2 = 9.53160604;
th9 = 129.85280129;
r10 = 6.48724184;
th10 = 49.98718547;
r11 = 0.45876947;
th11 = 163.22642382;
r13_1 = 2.231140;
r13 = 5.49701918;
r14 = 4.90813124;
r15 = 4.26848605;
r16_1 = 6.90211437;
r16_2 = 5.58711046;
r17_2 = 4.66865764;
th17 = 141.3590041;
r18 = 6.49056539;
th18 = 103.38347549;
r24 = 6.11345151;
th24 = 67.35451271;
y = 3.57084555;
th16_2 = th16_1 + y;
%% Position Vectors
real_6p_1 = r18*cosd(th18) + r17_2*cosd(th17) + r16_1*cosd(th16_1) + r14*cosd(th14) + r13_1*cosd(th13) == r24*cosd(th24) + r11*cosd(th11) + r10*cosd(th10) + r9_2*cosd(th9) + r8_4*cosd(th8_4);
imag_6p_1 = r18*sind(th18) + r17_2*sind(th17) + r16_1*sind(th16_1) + r14*sind(th14) + r13_1*sind(th13) == r24*sind(th24) + r11*sind(th11) + r10*sind(th10) + r9_2*sind(th9) + r8_4*sind(th8_4);
real_6p_2 = r18*cosd(th18) + r17_2*cosd(th17) + r16_2*cosd(th16_2) + r15*cosd(th15) + r13*cosd(th13) == r24*cosd(th24) + r11*cosd(th11) + r10*cosd(th10) + r9_2*cosd(th9) + r8_4*cosd(th8_4);
imag_6p_2 = r18*sind(th18) + r17_2*sind(th17) + r16_2*sind(th16_2) + r15*sind(th15) + r13*sind(th13) == r24*sind(th24) + r11*sind(th11) + r10*sind(th10) + r9_2*sind(th9) + r8_4*sind(th8_4);
S = solve([real_6p_1 imag_6p_1 real_6p_2 imag_6p_2], [th13 th14 th15 th16_1]);
th13 = vpa(S.th13);
th14 = vpa(S.th14);
th15 = vpa(S.th15);
th16_1 = vpa(S.th16_1);
th16_2 = vpa(th16_1 + y);
Accepted Answer
More Answers (0)
Categories
Find more on Satellite Mission Analysis 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!