Solving for variables in 4-by-4 matrix, Empty sym: 0-by-1

I'm trying to do a symbolic solve on a set of matrix multiplications and just get Empty sym: 0-by-1 as a result.
To find the reason I tested with simplified matrices and vectors:
syms alfa r
syms alfa2 r2
out = [190;486;800;1078];
in = [17;18;19;20];
DH = [1 2 3 alfa;
5 6 7 r;
9 10 11 12;
13 14 15 16];
out2 = [68;167;266];
in2 = [10;11;12];
DH2 = [1 2 alfa2;
4 5 r2;
7 8 9];
[alfa, r] = solve(out == DH * in, alfa, r)
[alfa2, r2] = solve(out2 == DH2 * in2, alfa2, r2)
The 4-by-4 version gives me Empty sym on both alfa and r, the 3-by-3 version gives med correct results of alfa2 = 3 and r2 = 6.
Why don't the 4-by-4 version work?

 Accepted Answer

Recalculate 9*17+10*18+11*19+12*20.
Best wishes
Torsten.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!