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: Repeat loop - help
Replies: 3   Last Post: Sep 13, 2013 12:45 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
John Dickson

Posts: 18
Registered: 10/30/11
Repeat loop - help
Posted: Sep 13, 2013 5:40 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I tried the following

c=1;
for c=1:10;

> D = maximin(n1,n2,'euclidean');
> M = min(D,[],2); ;
> C=[D M];
> [maxValue, rowIdx] = max(C(:,end),[],1); %max value and the row index
> n1(end+1,:) = n2(rowIdx,:); %Copy selected row to bottom of n1
> n2(rowIdx,:) = [];


c=c+1
end

It gives me n1=60*50, but n2=29*30 instead of 20*30



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.