Programa De Analisis Numerico

Páginas: 2 (462 palabras) Publicado: 25 de junio de 2012
PROGRAMA PARA EL METODO DE ELIMINNACION DE GAUSS
unit ElimGauss;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Grids;

type
Matrix = array[1..100 , 1..100] of Double;
TForm1 = class(TForm)
tablaCoeficientes: TStringGrid;
Label1: TLabel;
tablaSolucion: TStringGrid;
Label2:TLabel;
Label3: TLabel;
botonResolver: TButton;
cajaNumero: TEdit;
tablaResultado: TStringGrid;
Label5: TLabel;
procedure initMatriz(Sender: TObject; var Key: Char);procedure resolverSistema(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R*.dfm}

procedure TForm1.initMatriz(Sender: TObject; var Key: Char);
VAR
i, tam: Integer;
begin

IF Key = #13 THEN
begin
tam := StrToInt(cajaNumero.Text) + 1;tablaCoeficientes.ColCount := tam;
tablaCoeficientes.RowCount := tam;

tablaResultado.RowCount := tam;
tablaResultado.Cells[1,0] := 'Valor';

tablaSolucion.RowCount := tam;tablaSolucion.Cells[1,0] := 'Valor';

FOR i := 1 TO tablaCoeficientes.RowCount - 1 DO
begin
tablaCoeficientes.Cells[0,i] := 'ecuacion ' + IntToStr(i);tablaCoeficientes.Cells[i,0] := 'X ' + IntToStr(i);
tablaResultado.Cells[0,i] := 'b ' + IntToStr(i) + ' =';
tablaSolucion.Cells[0,i] := 'X ' + IntToStr(i) + ' =';
end;

end;
end;

proceduredividirValor(VAR matriz:Matrix; VAR vector:Array of Double; indice,tam: Integer; valor: Double);
VAR j: Integer;
begin
FOR j := 1 TO tam - 1 DO
matriz[indice,j] :=matriz[indice,j]/valor;

vector[indice - 1] := vector[indice - 1]/valor;
end;

procedure sumarFila(VAR matriz:Matrix; VAR vector:Array of Double; indice,fila,tam:Integer; valor:Double);
VAR j:...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Metodos numericos (analisis numerico)
  • Analisis Numerico
  • Analisis Numerico
  • Analisis numerico
  • Analisis Numerico
  • Analisis Numerico
  • analisis numericos
  • Analisis Numerico

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS