Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matlab fail to found symbolic equation system solution, why?
Replies: 3   Last Post: Jul 31, 2013 11:39 AM

 Messages: [ Previous | Next ]
 Fernando Posts: 4 Registered: 6/28/13
Matlab fail to found symbolic equation system solution, why?
Posted: Jun 28, 2013 6:39 PM

Dear friends,

I need help to solve a symbolic equation system, four equations and four variables, seems simple, but does not work. See the code:

%Declare 4 real symbolic variables ...
syms('a0','real','a1','real','a2','real','a3','real');

%Declara the symbolic 2x2 matrix R ...
R = ...
[exp(a0*i)*exp(-(a1*i)/2)*exp(-(a3*i)/2)*(exp(-(a2*i)/2)/2 + exp((a2*i)/2)/2), ...
-exp(a0*i)*exp(-(a1*i)/2)*exp((a3*i)/2)*((exp(-(a2*i)/2)*i)/2 - (exp((a2*i)/2)*i)/2); ...
exp(a0*i)*exp((a1*i)/2)*exp(-(a3*i)/2)*((exp(-(a2*i)/2)*i)/2 - (exp((a2*i)/2)*i)/2), ...
exp(a0*i)*exp((a1*i)/2)*exp((a3*i)/2)*(exp(-(a2*i)/2)/2 + exp((a2*i)/2)/2)];

%Generating a sample matrix L ...
L = subs(R, [a0 a1 a2 a3], [pi/7 pi/5 pi/3 pi])

L =
0.1162 - 0.8582i 0.0671 - 0.4955i
0.3455 - 0.3614i -0.5985 + 0.6260i

However, the matlab does not found solution to R == L, see:

>> solve(R == L)
Warning: Explicit solution could not be found.
> In solve at 169

ans =
[ empty sym ]

Why the solution [pi/7 pi/5 pi/3 pi] isn't found? How do it correctly?

Best regards,
Fernando

Date Subject Author
6/28/13 Fernando
6/30/13 Fernando
7/31/13 Stefan Wehmeier
7/31/13 Fernando