Jump to content

Suggestions about large Matrices???

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
jakopo

jakopo

    Newbie

  • Members
  • Pip
  • 5 posts
Hi!

I'm not a programmer, I'm actually working with Matlab, and I'm dealing with symbolic matrices: I need to work with 5000x5000 matrices and invert them, I have to solve some linear systems.

But, since I have problems with it -it's very time-consuming, already 10x10 symbolic matrices crash everything, it's not like using matrices filled with numbers- I was thinking whether I can change my programming language: probably c++ or something else could be better suited for solving simple but large systems?

Thank you very much for your suggestions! :w00t:

Jacopo

#2
bobdark

bobdark

    Programmer

  • Members
  • PipPipPipPip
  • 164 posts
What exactly do you want to do in the other programming language? Only to invert matrices?

#3
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,721 posts
I'd suggest C/C++, but how are you going to input the matrices? A file? By hand?
sudo rm -rf /

#4
jakopo

jakopo

    Newbie

  • Members
  • Pip
  • 5 posts
Hi!

Yes, I just need to invert a matrix and then to change some of its entries when I need to set them equal to zero. I know it's easy, my problem is just its size.
Well, in Matlab I've written a little file that creates the matrix and then invert it. It works and I can transfer it to c++. I will try!
Thank you very much for the suggestion!

Jacopo

#5
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,721 posts
I meant "Are you going to read the matrices from a file?"
sudo rm -rf /

#6
jakopo

jakopo

    Newbie

  • Members
  • Pip
  • 5 posts
No, it's actually my program that creates the entries of the matrix from a statistical distribution, set them to the proper place and then invert the matrix. I have no files from which I read it... :confused:

#7
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,721 posts
Oh, ok. So as long as you can code the statistical distribution into C/C++ then you should be fine. I strongly suggest that you compile with maximum speed optimizations. I can tell you right now, though, that coding the RREF bit is going to be a PAIN.
sudo rm -rf /

#8
jakopo

jakopo

    Newbie

  • Members
  • Pip
  • 5 posts
Thank you very much Dargueta, now I've a path to follow! Your indications are precious, and I know what to expect.
So, let's delve into C++ now a face the pain! ;-)

#9
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,721 posts
Ooh, pain. I love pain. :D Luckily I found an RREF algorithm already implemented in C (written over six years ago, mind you) so we should be able to tweak it a bit to work with what you need. Most of the work is already done for you.

Attached Files


sudo rm -rf /

#10
jakopo

jakopo

    Newbie

  • Members
  • Pip
  • 5 posts
Uh, many thanks! That's big stuff! :thumbup: I've a lot to learn from this code, as far as I can see.
With this, I can try to begin to translate everything from Matlab.
This is huge Help!!:lol:

Many many thanks!!

Jacopo

#11
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,721 posts
No problem! Let me know if you have issues.
sudo rm -rf /