Matlab eigenvectors of symbolic matrix not working

In summary, Maxeig does not support symbolic and the user is advised to use maple or Wolfram Alpha for the desired calculations.
  • #1
Maxong091
4
0
Hi all,

I'm trying to find the eigenvectors of a symbolic 3x3 rotation matrix in MATLAB, it appears to work for some inputs but not all, for example:

A =[ cos(q), -sin(q), 0]
[ sin(q), cos(q), 0]
[ 0, 0, 1]

[V,lambda]=eig(A)

V =[ 0, -i, i]
[ 0, 1, 1]
[ 1, 0, 0]

lambda =[ 1, 0, 0]
[ 0, cos(q) - sin(q)*i, 0]
[ 0, 0, cos(q) + sin(q)*i]

this works fine, however if I try something which is not a rotation about a unit axis I get the following error:

A =[ cos(q), -sin(q), 0]
[ 0, 0, -1]
[ sin(q), cos(q), 0]

>> [V,lambda]=eig(A)
Warning: basis of eigenspace for eigenvalue cos(q)/3 - (cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 +
(cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)/2 + (cos(q)/3 - cos(q)^2/9)/(2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 +
((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/... [linalg::eigenvectors]
? Error using ==> mupadmex
Error in MuPAD command: Unable to find explicit eigenvectors.

Error in ==> sym.sym>sym.mupadmexnout at 2003
out = mupadmex(fcn,args{:});

Error in ==> sym.eig at 68
[V,D,p] = mupadmexnout('mllib::eigenvectors',A);


Any help would be appreciated
Thanks
Max
 
Physics news on Phys.org
  • #2

FAQ: Matlab eigenvectors of symbolic matrix not working

1. Why is Matlab giving me an error when I try to calculate the eigenvectors of a symbolic matrix?

This could be due to several reasons. One possible reason is that the symbolic matrix is not properly defined or has invalid entries. Another reason could be that the matrix is not a square matrix, which is a requirement for calculating eigenvectors. Additionally, the matrix may be too large or have complex entries, which can also cause errors in the calculation.

2. How can I ensure that Matlab correctly calculates the eigenvectors of a symbolic matrix?

To ensure accurate results, make sure that the symbolic matrix is properly defined and has valid entries. Also, ensure that the matrix is a square matrix and does not have any complex entries. If the matrix is too large, consider breaking it into smaller matrices and calculating the eigenvectors separately.

3. What is the difference between calculating eigenvectors for a numeric matrix and a symbolic matrix in Matlab?

In Matlab, calculating eigenvectors for a numeric matrix is a straightforward process as it uses numerical methods. However, calculating eigenvectors for a symbolic matrix involves symbolic computations, which can be more complex and may require additional steps to ensure accurate results.

4. Can I use the eigenvectors of a symbolic matrix in further calculations or operations?

Yes, you can use the eigenvectors of a symbolic matrix in further calculations or operations. However, keep in mind that eigenvectors of symbolic matrices may have symbolic expressions, which may need to be converted into numerical values before using them in calculations.

5. Are there any alternatives to using Matlab for calculating the eigenvectors of a symbolic matrix?

Yes, there are other software programs and programming languages that can also calculate the eigenvectors of a symbolic matrix. Some examples include Mathematica, Maple, Python, and R. However, the specific steps and commands may vary between these programs.

Similar threads

Replies
2
Views
562
Replies
5
Views
2K
Replies
1
Views
2K
Replies
10
Views
2K
Replies
2
Views
1K
Replies
8
Views
1K
Back
Top