solve the linear equation

I am trying to solve the linear equation A.x=C. I created the matrix as shown below to find the x. When I increase the dimension (n) to for example n=100000, I get an error as:
"Unhandled exception at at 0x778EDDC2 in Project7.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x00A4F65C."

but the code works for n<1000.

Does anyone have any idea to solve this error or any other fast method to solve this linear
equation?
--------------------------------------------------------
Công ty <a href="https://ruthamcau.suu.vn/rut-ham-cau-quan-go-vap.html">rut ham cau quan go vap</a> giá rẻ dịch vụ <a href="https://ruthamcau.suu.vn/rut-ham-cau-quan-go-vap.html">rút hầm cầu quận gò vấp</a> tận tâm
Last edited on
I see no matrix.

If you try to input all elements of an nxn matrix with n=100000 then you will run out of addressable memory.

You should probably treat it as a sparse matrix problem (where you only store a few elements of the matrix).

But we'll never know ... because you don't show your matrix.
Topic archived. No new replies allowed.