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: Sorting ordered pairs
Replies: 2   Last Post: Nov 27, 2012 7:39 AM

Advanced Search

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

Posts: 2
Registered: 11/27/12
Sorting ordered pairs
Posted: Nov 27, 2012 12:44 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am trying to sort ordered pairs of a very large data set based on the criteria that
y(i) >= 17000 + 2*x(i).
I want to keep the ordered pairs that meet the criteria and get rid of the ones that don't. I was thinking about a for loop along the lines:

for i=1:length(x)
if y(i)>= 17000+2.*x(i)
y=y(i);
x=x(i);

but then I didn't know where to go from there.
Any help would be appreciated.



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.