QR Factorization of a 10 x 10 Matrix

I need to Solve a 10 x 10 Matrix using QR factorization. please Write a MATLAB program for calculating the QR factorization of any 10 × 10 matrix.

답변 (1개)

Jan
Jan 2011년 12월 20일

0 개 추천

X = rand(10, 10);
[Q, R] = qr(X);

댓글 수: 4

Walter Roberson
Walter Roberson 2011년 12월 20일
But, Jan, it has to work for *any* 10 x 10 matrix. The code you show would not work for a 10 x 10 matrix of objects, for example.
Jan
Jan 2011년 12월 20일
@Walter: It does _work_ for objects! Matlab displays a clear and expressive error message when I try it. And after I've requested a copy of the error message in this forum so often, I accept the display of the message as _work_.
Walter Roberson
Walter Roberson 2011년 12월 20일
Does it "solve" char(eye(10)) ?
Jan
Jan 2011년 12월 20일
Yes. As usual in mathematics, the canny addition of a zero allows a solution:
[Q, R] = qr(char(eye(10)) + 0)

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2011년 12월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by