Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Merging multiple matrices
Replies: 4   Last Post: May 9, 2013 10:56 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Martijn van Sebille

Posts: 1
Registered: 5/9/13
Merging multiple matrices
Posted: May 9, 2013 9:44 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear,

I am trying to efficiently merge multiple matrices, combining their maximal values. For example:
If A = [1 1 2; 1 2 1; 2 1 1] and B = [3 1 1; 1 3 1; 1 1 3], then their maximal values combined would be: C = [3 1 2; 1 3 1; 2 1 3].
I want to combine multiple matrices like this, up to 10. And these matrices can be quite big, up to 2000x2000.

At the moment I have several loops, which consider for every position (x,y) which of the values in each of the matrices is largest and then writes the largest to position (x,y) of the combined matrix.

It works fine, but can take very long, up to 20 minutes. Does anyone know of a more efficient method to achieve the same?

Thanks for any help.

Regards,
Martijn



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.