Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Ian
Posts:
14
Registered:
9/21/10


Quick Problem (sorting data)
Posted:
Sep 30, 2010 4:55 AM


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.


Date

Subject

Author

9/30/10


Ian

9/30/10


Jos

9/30/10


Ian

9/30/10


Ian

9/30/10


Jos

9/30/10


Ian


