Re: Data Extraction from List {{x1,y1}..{xn,yn}}where ##<x<##
- To: mathgroup@smc.vnet.net
- Subject: [mg11719] Re: [mg11694] Data Extraction from List {{x1,y1}..{xn,yn}}where ##<x<##
- From: Wouter Meeussen <eu000949@pophost.eunet.be>
- Date: Thu, 26 Mar 1998 03:08:47 -0500
At 18:35 21-03-98 -0500, charles wrote: >Hello, > >How might I extract a range of {x,y}from a list of data, so that I can >perform a linear fit between the point that meet the criterion of being >bewteen x_n and x_m. > >In other words, fit a line to a part of the data that has #1<x<#2. > >I have attempted to use the Select function but it requires me to >Flatten the data list first? And it results in giving me a list of just >the x values not the {x,y} pairs. > >Any help is greatly appreciated. > >Thanks, > >Charles Koehler > > > hi Charles, try: data=Table[{Random[],Random[]},{12}] Select[data,(#[[1]]>.2&&#[[1]]<.5)&] Dr. Wouter L. J. MEEUSSEN w.meeussen.vdmcc@vandemoortele.be eu000949@pophost.eunet.be