college/ws2012/CE/uebungen/7/ceUebung.sci
2013-01-03 11:20:32 +01:00

1 line
356 B
Scilab

function [matrixOutput] = ceUebung(x0)
x = x0;
//speichermatrix
matrixOutput = [];
//diagonalmatrix B
matrixB = [-0.1 0 0 ; 0 -0.05 0; 0 0 -0.05];
//Gleichungssystem
fX = [8*x(1) + x(2) - 2*x(3) ;
x(1) + 18*x(2) - 6*x(3) ;
2*x(1) + x(2) + 16*x(3)];
for i=1:1:10
x = x + matrixB * fX;
matrixOutput(i) = x;
end
endfunction