# Matlab help...!

Discussion in 'The Lounge' started by az-k5, Apr 25, 2006.

1. ### az-k51/2 ton status

Joined:
Oct 15, 2003
Posts:
2,774
0
Location:
Phoenix AZ
I have a matlab assignment I am working on. It is kicking my ace.

I need to make a phase plot of a 3x3 matrix.

I know how to do a 2x2, but adding a Z parameter is getting me.

2x2 file of
[-4,-6;-1,6]

>>f=inline('(-4*x-6*y)./(-x+6*y)','x','y')
f =
Inline function:
f(x,y) = (-4*x-6*y)./(-x+6*y)

>> dirfield(f,[-2,2,-2,2],'line')

>> axis equal tight

What is the trick for a 3x3?

Thanx

2. ### midnitewaryaSounds like a problem for future me.Premium Member

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
I think this qualifies as tech.

Yep, eyes are burning.

This is tech.

FOR SHAME!

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
4. ### midnitewaryaSounds like a problem for future me.Premium Member

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
I think the main prob is the function. There is no way that will work with three variables in a 3x3.

5. ### midnitewaryaSounds like a problem for future me.Premium Member

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
All linear algebra functions work only on 2-D matrices. You can not multiply two 3-dim matrices.

6. ### az-k51/2 ton status

Joined:
Oct 15, 2003
Posts:
2,774
0
Location:
Phoenix AZ
I know that function is useless on a 3x3 as it is a manipulation of dy/dx. I don't know how to use the plot3 command for a matrix.

7. ### midnitewaryaSounds like a problem for future me.Premium Member

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
Was this a homework problem? I think it's a trick question. To solve for a 3x3 matrix, there is no way linear funtion could work. You can do it for an array, but not in a matrix.

8. ### midnitewaryaSounds like a problem for future me.Premium Member

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
You got me stumped dude, sorry.

9. ### az-k51/2 ton status

Joined:
Oct 15, 2003
Posts:
2,774
0
Location:
Phoenix AZ
Ya it is a lab/homework. I am not positive I am supposed to plot the 3x3's but the professor made a big deal in class last week. Oh well, I am just running the program for the eigen values and eigenvectors and calling it a night. I still need to do a double mixing tank problem in the morning (god damn I love the week before the end of the semister).

10. ### midnitewaryaSounds like a problem for future me.Premium Member

Joined:
Dec 1, 2002
Posts:
1,726
20
Location:
SoCal
Brain hurting...flashbacks of studying and deadlines...must drink beer...

I remember my final for that class. We had to make solitare. In three hours. It seems easy....

I got a "B". I couldn't get the rows to lock, and you could cheat like crazy.

Seems like forever ago...

Joined:
Sep 16, 2003
Posts:
6,798