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: Quick Problem (sorting data)
Replies: 5   Last Post: Sep 30, 2010 11:01 AM

Advanced Search

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

Posts: 14
Registered: 9/21/10
Quick Problem (sorting data)
Posted: Sep 30, 2010 4:55 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In matlab how would I locate the values from (g) using the values from (f) and create them as a seperate variable (h):

g=[ 7 2520
8 2375
10 3618
12 2694
14 2158
15 2842]

f=[2520;3618;2842]

The variable I would want to create from (g) using (f) would be:

h=[7 2520
10 3618
15 2842]

I acknowledge this is probably a very straight foward excercise, but I have only really started using matlab and cannot seem to find a way of doing these on the help guide. I know this could be done just by creating a new variable by simply typing the new vaules in as shown in (h), but the data set I have is very much larger than the example shown here.



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.