Metoda Householder.docx

  • Uploaded by: CosminAvăcăriței
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Metoda Householder.docx as PDF for free.

More details

  • Words: 52
  • Pages: 1
METODA HOUSEHOLDER

clc; disp('Introduceti matricea sistemului: '); a=input('A= '); disp('Coloana termenilor liberi: '); b=input('B= '); A=a;B=b; [n,n]=size(A); for i=1:n-1 s=norm(a(i:n,i),2); beta=1/(s^2+abs(a(i,i)*s)); u=zeros(n,1); if a(i,i)==0 t=1; else t=sign(a(i,i)); end u(i)=a(i,i)+t*s; for j=i+1:n u(j)=a(j,i); end H=eye(n)-beta*u*u'; a=H*a b=H*b; end x=zeros(n,1); x(n)=b(n)/a(n,n); for i=n-1:-1:1 p=0; for j=i+1:n p=p+a(i,j)*x(j); end x(i)=(b(i)-p)/a(i,i); end disp('Solutia este: ') x

Related Documents

Metoda Rodowodowa
May 2020 35
Metoda Ciorchinelui
June 2020 27
Metoda Proiect
June 2020 13
Metoda Costului.docx
December 2019 25
Metoda Greedy
May 2020 18