c - Gaussian elimination from pseudocode -


I have tried to convert the Gaussian eradication of pseudoscopy into actual implementation in C. I have done it, I have not received any error, but in the form of input I am getting the same output, does anyone know, where can I find a fault? As an implant I have 3x4 matrix A, where the number refers to the number of rows (in this case 3) and num + 1 refers to the number of columns.
  zero ge () {int i = 1; Int j = 1; Int k, u; Whereas (i & lt; = num & j & lt; = num + 1) {int maxi = i; (K = i + 1; k & lt; num; k ++) {if (abs (a [k] [j]) abs (a [maxi] [j])) {maxi = k; }} If (A [Maxi] [J]! = 0) {Float P; P = A [Maxi] [J]; A [maxi] [j] = a [i] [j]; A [i] [j] p =; (U = I + 1; U & LT; number; U ++) {A [U] [J] = A [U] [J] -A [I] [J] * A [U] [J ]; }} // Andif J ++; I ++; } / />   

Edit:

  FILE * Input Metrics = FOPAN ("file.in", "r"); Fscanf (inputMatrix, "% d", & amp; number); For (i = 0; i   

file.in:

  3 2 -1 -1 8 -3 -1 2 -11 -2 1 2 -3   
  (k = j; k) & Lt; = num + 1; ++ k) {a [i] [k] / = a [i] [j]]; }    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -