# MathExplorer: Learn about math interactively with MuPAD! 3

Posted by **Jiro Doke**,

- Vectors
- Complex Numbers
- Differentiation
- Integration
- Taylor Series
- Multivariable Calculus
- Ordinary Differential Equations
- Laplace Transform
- Vector Calculus
- Linear Algebra

**Comments**Students out there, learn about mathematical concepts in a fun, interactive way using MathExplorer! If you're a professor, give this a try in your courses! Let us know what you think here or leave a comment for Martin.

Get the MATLAB code Published with MATLAB® R2012b

**Category:**- Picks

### Note

Comments are closed.

## 3 CommentsOldest to Newest

**1**of 3

Hi,

I saw it on facebook,

good and …

Regards

yousof

**2**of 3

Hi

would you mind telling me How could I have good code for a tensor of tension that can show eig value and draw them in defferent figures?

I have a simple one but it has error because the value of eigenvalues are not real and has imaginry part that lead to have not the right figures that draw the eig base on their eigenvectors,

as an example I assume a simple tensor,amatrix a that has symbolic member(x),now we wanna draw the figure of eigenvalues base on x;

look over this:

function ykh

syms x

a=input(‘enter members of matrix a like this”a=[1 2 3;x 2*x 3;9 8 7]”‘)

[v,d]=eig(a);

d1=d(1,1);

d2=d(2,2);

d3=d(3,3);

disp v

disp d

figure(1)

ezplot(x,d1)

figure(2)

ezplot(x,d2)

figure(3)

ezplot(x,d3)

end

this is a simple example,generaly How we can have a tensor or matrix that have symbolic members [x11 x12 ….x1n;x21 x22….x2n;xn1 xn2….xnn] and drawing eigenvalues base on a member of tensor or matrix,

sincere

yousof

**3**of 3

The following mupad (notebook) code may not be exactly what is required, but it plots the eigenvalues of an n*n matrix which is a function of a single symbolic parameter a, where a can vary between limits and the expected range of a is animated. There are some limitations about unique eigenvectors etc and it hasn’t been extensively tested, but you should be able to pull something useful out?

aRange := 2..10;

A := matrix([[1,2,3],[a,2*a,3],[9,8,7]]);

V := linalg::eigenvectors(A);

Ve := V[1][3][1]:

for k from 2 to linalg::ncols(A) do

Ve := linalg::concatMatrix(Ve, V[k][3][1]):

end;

plot(plot::Scene3d(plot::Matrixplot(Re(Ve), x=1..linalg::nrows(A), y=1..linalg::ncols(A), a=aRange), Header=”Real”),

plot::Scene3d(plot::Matrixplot(Im(Ve), x=1..linalg::nrows(A), y=1..linalg::ncols(A), a=aRange), Header=”Imaginary”),

Layout=Horizontal, Width=240);

## Recent Comments