6 views (last 30 days)

Hi everyone!

I want to know what is the differnce between the Gram-Smith procedure and qr.m function in matlab. Why there is a fourth coulmn resulting from using qr.m function? The photo is attached for the Gram-Smith procedure .Any help will be so appreciated.

The code is

A=[1 -2 -1; 2 0 1; 2 -4 2;4 0 0];

[Q,R] = qr(A)

The result is

Q =

-0.2000 0.4000 0.8000 -0.4000

-0.4000 -0.2000 -0.4000 -0.8000

-0.4000 0.8000 -0.4000 0.2000

-0.8000 -0.4000 0.2000 0.4000

R =

-5.0000 2.0000 -1.0000

0 -4.0000 1.0000

0 0 -2.0000

0 0 0

Christine Tobler
on 28 Sep 2020

f
on 22 Oct 2020

Christine Tobler
on 22 Oct 2020

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 0 Comments

Sign in to comment.