Metodo de jacobi.txt

clear; clc; n=input('Numero de ecuaciones (n): '); a=input('Ingrese la matriz A de coeficientes: '); b=input('Ingrese el vector de valores b: '); epsilon=input('Ingrese el error permitido (valor de la norma): '); xo=zeros(1,n); x=xo; error=1; ite=0; while error epsilon ite=ite+1; disp('iteracion numero:'); fprintf ('%d', ite); for i=1:1:n suma=0; for j=1:1:n if i~=j suma=suma+a(i,j)*x(j); end end

Please download to get full document.

View again

of 1
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.


Publish on:

Views: 6 | Pages: 1

Extension: TXT | Download: 0

  clear;clc;n=input('Numero de ecuaciones (n): ');a=input('Ingrese la matriz A de coeficientes: ');b=input('Ingrese el vector de valores b: ');epsilon=input('Ingrese el error permitido (valor de la norma): ');xo=zeros(1,n);x=xo;error=1;ite=0;while error>epsilon ite=ite+1; disp('iteracion numero:'); fprintf ('%d', ite); for i=1:1:n suma=0; for j=1:1:n if i~=j suma=suma+a(i,j)*x(j); end end x(i)=(b(i)-suma)/a(i,i); fprintf('%10.6f\n' , x(i)); end error=norm(xo-x); disp('Valor del error: '); fprintf('%10.6f\n', error); xo=x;end
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!