Codigo Fuente

2
CODIGO FUENTE ‘ALGORITMO DE GAUSS’ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A=[-1,1,0,0,0;1,0,1,-1,0;0,0,0,1,1;0,1,1,0,1] A = -1 1 0 0 0 1 0 1 -1 0 0 0 0 1 1 0 1 1 0 1 >> B=[-400;600;100,300] Error using vertcat Dimensions of matrices being concatenated are not consistent. >> B=[-400;600;100;300] B = -400 600 100 300 >> C=[A,B] C = -1 1 0 0 0 -400 1 0 1 -1 0 600 0 0 0 1 1 100 0 1 1 0 1 300 >> rank(A) ans = 3

description

yy

Transcript of Codigo Fuente

Page 1: Codigo Fuente

CODIGO FUENTE ‘ALGORITMO DE GAUSS’%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A=[-1,1,0,0,0;1,0,1,-1,0;0,0,0,1,1;0,1,1,0,1]

A =

-1 1 0 0 0 1 0 1 -1 0 0 0 0 1 1 0 1 1 0 1

>> B=[-400;600;100,300]Error using vertcatDimensions of matrices being concatenated are not consistent. >> B=[-400;600;100;300]

B =

-400 600 100 300

>> C=[A,B]

C =

-1 1 0 0 0 -400 1 0 1 -1 0 600 0 0 0 1 1 100 0 1 1 0 1 300

>> rank(A)

ans =

3

>> rank(c)Undefined function or variable 'c'.

Page 2: Codigo Fuente

Did you mean:>> rank(C)

ans =

3

>> rref(C)

ans =

1 0 1 0 1 700 0 1 1 0 1 300 0 0 0 1 1 100 0 0 0 0 0 0