What Are the Key Components of Gram Schmidt Algorithms for QTQ-I in MATLAB?

  • Thread starter Thread starter Jamin2112
  • Start date Start date
Jamin2112
Messages
973
Reaction score
12

Homework Statement



So my assignment is to compare a variety of Graham Schmidt algorithms by looking at ||QTQ-I||1

Homework Equations



So my teacher has the algorithms for the Gram Schmidt and "Modified Gram Schmidt" written as

screen-capture-3-21.png

The Attempt at a Solution



So I'm confused about the qi which appears in the Classical one. Where did it come from? What does it mean?

Also, what is the rij? Just a constant to use in the next line?

Same with the stuff in the Modified one.

I just went ahead and typed into MATLAB even though it ain't makin' sense.
screen-capture-2-16.png
 
Physics news on Phys.org
Hi Jamin2112! :smile:

Jamin2112 said:
So I'm confused about the qi which appears in the Classical one. Where did it come from? What does it mean?

qi is introduced in this algorithm.
The point of the algorithm is to find a set of qi that form an orthonormal basis.
That is, qi is the "output" of the algorithm.

Jamin2112 said:
Also, what is the rij? Just a constant to use in the next line?

Yes, it is just a constant to use in the next line.

Note that it holds the result for the inner product of qi and aj, which is ultimately needed to calculate qj.
 
I like Serena said:
Hi Jamin2112! :smile:



qi is introduced in this algorithm.
The point of the algorithm is to find a set of qi that form an orthonormal basis.
That is, qi is the "output" of the algorithm.


But if you look in the Classical Gram Schmidt algorithm, q is used on the right side of an equality before it has been defined.
 
Jamin2112 said:
But if you look in the Classical Gram Schmidt algorithm, q is used on the right side of an equality before it has been defined.

I see why you might think that, but no it isn't.
Check the range of the inner loop.

Any qj is only used after it has been calculated.

In the first iteration of the outer loop (j=1), the inner loop is not executed (since i runs from 1 to j-1).
In every next iteration of the outer loop, only the qj that have already been calculated are used.
 
I like Serena said:
I see why you might think that, but no it isn't.
Check the range of the inner loop.

Any qj is only used after it has been calculated.

In the first iteration of the outer loop (j=1), the inner loop is not executed (since i runs from 1 to j-1).
In every next iteration of the outer loop, only the qj that have already been calculated are used.

hmmmmm ...

Well, the program seems to running without any errors, so I'll take your word for it!
 
Jamin2112 said:
hmmmmm ...

Well, the program seems to running without any errors, so I'll take your word for it!

All right. I'll leave it at that then. :smile:

Let me know if you have more questions.
 
I like Serena said:
All right. I'll leave it at that then. :smile:

Let me know if you have more questions.

Turned it in and got 10/10 [PLAIN]http://www.fastfatburning.org/wp-content/plugins/RSSPoster_PRO/cache/c2584_success_baby.jpg

But I do have another question. Refer yourself to my QR Decomposition thread.
 
Last edited by a moderator:

Similar threads

Replies
16
Views
3K
Replies
4
Views
2K
Replies
15
Views
2K
Replies
3
Views
3K
Replies
2
Views
1K
Replies
1
Views
2K
Back
Top