Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
double non0row(matrix A);matrix rref(P);matrix.format("%4g");A = [ 1,1,1,1,1; 1,2,3,4,5; 2,3,4,5,6 ];rref(A); B = [ 2,5,3; -1,2,1; 1,1,1 ];C = rref( B | .I(3) ).ratio;(B * C..()(4,5,6)).trun10;matrix.format("");///////////////////////////////////////// rref : reduced row echelon form///////////////////////////////////////////-----------------------------------------------// non zero row//-----------------------------------------------double non0row(matrix A) { erow = 1; for(i = A.m; i >= 1; i--) { if( A.row(i).maxentry.abs > 1.e-6 ) { erow = i; break; } } 0; // meaningless but necessary return erow; } 0;; // meaningless but necessary//-----------------------------------------------// reduced row echelon form//-----------------------------------------------matrix rref(P) { double heps,p,pivot,opt = 2; matrix x; heps = 1.e-6; A = P; irow = 1; erow = non0row(A); for(k = 1; k erow) break; if( A.row(irow).maxentry.abs < heps ) { A = A.swap(irow,erow); --erow; } 0; // meaningless but necessary 0; if( A.col(k).maxentry.abs < heps ) continue; p = A(irow,k).abs; pivot = irow; for(i = irow+1; i 1 ) A.row(irow) = x; for(i = 1; i
double non0row(matrix A);matrix rref(P);matrix.format("%4g");A = [ 1,1,1,1,1; 1,2,3,4,5; 2,3,4,5,6 ];rref(A); matrix.format("");///////////////////////////////////////// rref : reduced row echelon form///////////////////////////////////////////-----------------------------------------------// non zero row//-----------------------------------------------double non0row(matrix A) { erow = 1; for(i = A.m; i >= 1; i--) { if( A.row(i).maxentry.abs > 1.e-6 ) { erow = i; break; } } 0; // meaningless but necessary return erow; } 0;; // meaningless but necessary//-----------------------------------------------// reduced row echelon form//-----------------------------------------------matrix rref(P) { double heps,p,pivot,opt = 2; matrix x; heps = 1.e-6; A = P; irow = 1; erow = non0row(A); for(k = 1; k erow) break; if( A.row(irow).maxentry.abs < heps ) { A = A.swap(irow,erow); --erow; } 0; // meaningless but necessary 0; if( A.col(k).maxentry.abs < heps ) continue; p = A(irow,k).abs; pivot = irow; for(i = irow+1; i 1 ) A.row(irow) = x; for(i = 1; i
감사합니다.
댓글 감사합니다
double non0row(matrix A);
matrix rref(P);
matrix.format("%4g");
A = [ 1,1,1,1,1; 1,2,3,4,5; 2,3,4,5,6 ];
rref(A);
B = [ 2,5,3; -1,2,1; 1,1,1 ];
C = rref( B | .I(3) ).ratio;
(B * C..()(4,5,6)).trun10;
matrix.format("");
///////////////////////////////////////
// rref : reduced row echelon form
/////////////////////////////////////////
//-----------------------------------------------
// non zero row
//-----------------------------------------------
double non0row(matrix A) {
erow = 1;
for(i = A.m; i >= 1; i--) {
if( A.row(i).maxentry.abs > 1.e-6 ) { erow = i; break; }
} 0; // meaningless but necessary
return erow;
} 0;; // meaningless but necessary
//-----------------------------------------------
// reduced row echelon form
//-----------------------------------------------
matrix rref(P) {
double heps,p,pivot,opt = 2; matrix x;
heps = 1.e-6;
A = P;
irow = 1;
erow = non0row(A);
for(k = 1; k erow) break;
if( A.row(irow).maxentry.abs < heps ) {
A = A.swap(irow,erow);
--erow;
} 0; // meaningless but necessary 0;
if( A.col(k).maxentry.abs < heps ) continue;
p = A(irow,k).abs;
pivot = irow;
for(i = irow+1; i 1 ) A.row(irow) = x;
for(i = 1; i
double non0row(matrix A);
matrix rref(P);
matrix.format("%4g");
A = [ 1,1,1,1,1; 1,2,3,4,5; 2,3,4,5,6 ];
rref(A); matrix.format("");
///////////////////////////////////////
// rref : reduced row echelon form
/////////////////////////////////////////
//-----------------------------------------------
// non zero row
//-----------------------------------------------
double non0row(matrix A) {
erow = 1;
for(i = A.m; i >= 1; i--) {
if( A.row(i).maxentry.abs > 1.e-6 ) { erow = i; break; }
} 0; // meaningless but necessary
return erow;
} 0;; // meaningless but necessary
//-----------------------------------------------
// reduced row echelon form
//-----------------------------------------------
matrix rref(P) {
double heps,p,pivot,opt = 2; matrix x;
heps = 1.e-6;
A = P;
irow = 1;
erow = non0row(A);
for(k = 1; k erow) break;
if( A.row(irow).maxentry.abs < heps ) {
A = A.swap(irow,erow);
--erow;
} 0; // meaningless but necessary 0;
if( A.col(k).maxentry.abs < heps ) continue;
p = A(irow,k).abs;
pivot = irow;
for(i = irow+1; i 1 ) A.row(irow) = x;
for(i = 1; i
감사합니다.
댓글 감사합니다