Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
19-08-2020-JacobiSistema
# Método de Gauss-Jacobi c=c(8, 1, 1, 0, 2, 20, 9, 2, 1, 1, 2, 1, 11,2, 0, 3, 2, 1, -8, 1, 2, 1, 2, 3, 10) A=matrix(c,5,5,byrow=TRUE); A # Entrada da matriz A v=c(1,2,3,4,5); v # Entrada do vetor v Gjacobi<-function(A,b,erro){ n=length(b) Erro=erro+1 c=0*v B=0*A for ( i in 1:n){ c[i]=b[i]/A[i,i] B[i,]=A[i,]/A[i,i] B[i,i]=0 } x=0*b cont=1 while (Erro>=erro){ y=x x=c-B%*%y cont=cont+1 Erro=sum(abs(x-y)) if (cont>=10^6){Erro=0}} x } x=Gjacobi(A,v,10^(-16)) x x A%*%x-v
run
|
edit
|
history
|
help
0
EulerEx3
jcfatorial
ceiling.r
Efeito-Runge-18-03-2021
Fractal Fourier
Análise de variância ANOVA para experimento em DIC - Exemplo 01
Gab1B
Mandelbrotset
Generate numbers based on mean and stdev
28-09-2020Int-poli-inter