Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

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

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

Topic: maximum values in loops for 2d matrix
Replies: 4   Last Post: Aug 20, 2014 2:06 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Manolis Micailidis

Posts: 56
Registered: 8/19/14
maximum values in loops for 2d matrix
Posted: Aug 19, 2014 6:43 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

hello, i need for some defined times N=5 (i used while loop) ,to find the maximum values in a 2d matrix and save them each time so that the old max values not to be calculated again in the second repeat (for instance N=2). So i thought that i might need to delete the old max values before calculating the new ones , but having previously save them to a new matrix. Below i quote the code please take a look and advise ,thanks in advance.



for i1=1:cols
for j1=1:rows
if Sf(j1,i1)>maximum(i1)



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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2016. All Rights Reserved.