1. Urgent Matlab

I think i may have posted this before but watever... I have 3 column vectors belonging to S, these vectors are: [1;1;2;0] [-1;2;1;0] and [1;0;0;1]

I have been asked to find an orthogonal basis for S, I don't care if its not supposed to work..i just need to know how to write it into matlab to get some sort of answer.

Deragon999

2. There is a function orth(A) which returns the orthonormal basis for the given matrix A. You can fine what you want by writing your column vectors into one matrix and running the command on that:

>> S=[1,-1,1;1,2,0;2,1,0;0,0,1]

S =

1........ -1 ........1
1 ........2 ........0
2 ........1 ........0
0........ 0 ........1

>> orth(S)

ans =........

........*........-1170/1351........*
-985/1393 .....390/1351..... 881/2158
-985/1393 .....-390/1351 .....-881/2158
........ * ........-390/1351 .....881/1079

>>

the * means 0, since i had my matlab in format rat.

orthonormal is just orthogonal with the added perk of being normalized.

3. R=Thanks

Thats exactly what i thought i was supposed to get I just didn't understand the *S

4. if you just change to format long or type just format alone and re-enter orth(S), you will get 0s instead of *s. i think the * is supposed to be some kind of underflow flag....but im not sure. glad i could help.