Se eu existir, matem-me
17/06/2004
  O amor excruciante que tenho por ti, lua sem rosto, nunca poderá ser compaginável num heteróclito plenilúnico, porque sendo ele puro, apenas na acção está a verdade...


wolcit 
14/06/2004
  Escolha parcial de Pivot

1 rem "Sistema de Equações Lineares"
erase a, b, e, x: cls
input "Numero de equações:";n
cls
dim a(n,n), b(n), x(n), e(n)
for i=1 to n
for j=1 to n
print "A(";i;j;");:input a(i,j)
cls
next
print "B(";i;");:input b(i)
e(i)=i
cls:next:cls
for i=1 to n-1
max=abs(a(e(i),i)):t=i
for j=i+1 to n
if abs(a(e(j),i))>max then max=abs(a(e(j),i)):t=j
next
vt=e(i);e(i)=e(t);e(t)=vt
p=a(e(i),i)
if abs(a(e(i),i))<=1e-10 then print "Indeterminado / Impossivel": end
for j=i+1 to n
c=-a(e(j),i)/p
for k=i to n
a(e(j),k)=a(e(j),k)+a(e(i),k)*c
next
b(e(j))=b(e(j))+b(e(i))*c
next j,i
for i = n to 1 step -1
a=0
for j=i+1 to n
a=a+a(e(i),j)*x(e(j))
next
x(e(i))=(-a+b(e(i)))/a(e(i),i)
next
cls
for i=1 to n
print "X(";i;")=";x(e(i))
cls: next
goto 1
end


wolcit
 
Se um beijo é um erro estatistico, o amor é uma sombra chula

Arquivos
2003/07 - 2003/08 / 2003/11 - 2003/12 / 2003/12 - 2004/01 / 2004/03 - 2004/04 / 2004/04 - 2004/05 / 2004/06 - 2004/07 / 2004/07 - 2004/08 / 2006/11 - 2006/12 / 2007/02 - 2007/03 / 2007/11 - 2007/12 / 2008/01 - 2008/02 / 2008/05 - 2008/06 / 2008/08 - 2008/09 / 2008/12 - 2009/01 / 2009/01 - 2009/02 / 2011/04 - 2011/05 / 2017/11 - 2017/12 /


Powered by Blogger