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: 2 minimum numbers
Replies: 5   Last Post: Dec 25, 2012 12:19 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Fahad Saleem

Posts: 2
Registered: 12/22/12
2 minimum numbers
Posted: Dec 22, 2012 12:07 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi I need some help. I have a 25x25 matrix of rand value between 2 & 2.5. I want to do following steps but I am stuck :(

1- finding minimum nd 2nd minimum number (not row or col just 1 element) in selected 3x3 matrix which is located at
[(5,12) (5,13) (5,14);
(6,12) (6,13) (6,14);
(7,12) (7,13) (7,14)] of above matrix. but It must ignore (6,13) and find number in outer 8 locations.

2- from above minimum number it automatically select next matrix of 3x3 on following location
[(i-1, j-1) (i-1, j) (i-1, j+1);
(i, j-1) (i, j) (i, j+1);
(i+1, j-1) (i+1, j) (i+1, j+1)]
* minimum is at location (i,j)
and find again minimum and 2nd minimum number



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.