Can someone help me troubleshoot my Gaussian Elimination code for scaling?

  • Thread starter Thread starter jinro
  • Start date Start date
Click For Summary
SUMMARY

The forum discussion centers on troubleshooting a Gaussian Elimination code specifically related to scaling operations. The user encounters an issue where the output of the matrix A after scaling results in A[a][c]/t^2 instead of the expected A[a][c]/t. The user successfully creates an intermediate matrix A4 to store the scaled values but struggles to transfer these values back to the original matrix A correctly. The discussion highlights the importance of understanding matrix operations and memory handling in programming.

PREREQUISITES
  • Understanding of Gaussian Elimination algorithm
  • Familiarity with matrix operations in programming
  • Knowledge of C programming syntax and memory management
  • Experience with debugging techniques in code
NEXT STEPS
  • Review C programming pointers and memory allocation
  • Study matrix manipulation techniques in C
  • Learn about debugging tools in C, such as GDB
  • Explore alternative algorithms for Gaussian Elimination
USEFUL FOR

Programmers, computer science students, and anyone involved in numerical methods or linear algebra implementations in C programming.

jinro
Messages
4
Reaction score
0
hi

i have this problem

this is part of my code, where i am scaling in guassian elimination

A4[a][c] = A[a][c]/t;

when i put printf A4 at the bottom, it shows the right element divided by t

when i put
A[a][c] = A4[a][c];

my output for my input when i scale becomes A[a][c]/t^2. i try to make another matrix A3, and used A3 = A4, it showed the right answer, but i can't make it work for A!
 
Technology news on Phys.org
Show us your code. I can't figure out what's going on from your description.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
4
Views
4K
Replies
10
Views
2K
Replies
2
Views
3K