Name: ឡៅ ជីងសាន (Lao Chingsan) Class: ITE_M6_G8 Instructions II. ចូរដោះស្រាយរកឬសប្រព័ន្ធសមីការខាងក្រោម តាមវិធាន៖ ១) Cramer's rule ២) Inverse matrix ៣) Gaussian elimination ១) Cramer's rule ២) Inverse matrix ៣) Gaussian elimination
Posts
Showing posts from October, 2022
- Get link
- Other Apps
Name: ឡៅ ជីងសាន (Lao Chingsan) Class: ITE_M6_G8 Instructions I. ចូរសរសេរកូដ ដើម្បីគណនានិងដោះស្រាយ៖ ១) ដេទែមីណង់ (Determinant) ២) ម៉ាទ្រីសច្រាស (Inverse matrix) ៣) Gaussian elimination ៤) Iteration method 1. Determinant with C++ : //Lao Chingsan //Determinant with c++ #include <iostream> using namespace std ; //Cofactor Function void getCofactor ( int mat [ 20 ][ 20 ], int temp [ 20 ][ 20 ], int p , int q , int n ){ int i = 0 , j = 0 ; for ( int row = 0 ; row < n ; row ++){ for ( int col = 0 ; col < n ; col ++){ if ( row != p && col != q ){ temp [ i ][ j ++] = mat [ row ][ col ]; if ( j == n - 1 ){ j = 0 ; i ++; } } } } } //Determinant Function float detMat ( int A [ 20 ][ 20 ], int n ) { int D = 0 ; if ( n == 1 ) return A [ 0 ][ 0 ]; int temp [ 20 ][ 20 ]; int sign =