Re: Data Extraction from List {{x1,y1}..{xn,yn}}where ##<x<##
- To: mathgroup@smc.vnet.net
- Subject: [mg11756] Re: Data Extraction from List {{x1,y1}..{xn,yn}}where ##<x<##
- From: SChandler <SChandler@uh.edu>
- Date: Thu, 26 Mar 1998 03:09:25 -0500
- Organization: University of Houston
- References: <6f1p6l$ffn@smc.vnet.net>
If I understand your problem correctly, I believe the following would work. I've illustrated the method using a table of 20 random pairs and set x1=0.4 and x2=0.6. Select[Table[{Random[Real,{0,1}],Random[Real,{0,1}]},{20}],(0.4<#[[1]]<0.6)&] Seth J. Chandler Associate Professor of Law University of Houston Law Center 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