Student Support Forum: 'how to sample values from a listPlot' topicStudent Support Forum > General > "how to sample values from a listPlot"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response yehuda ben-shimol 09/23/07 11:47am Hi, The "continuous line" you are observing in ListPlot is practically an interpolated function. you cannot "sample" more point then the original list, since ListPlot only store the originals. However you can always generate the interpolated line yourself see the example below (* generate a 101 points list *) lis = Table[{t, Exp[-t]Sin[2 t]}, {t, 0, 5, 5/100.}] (* ListPlot it and notice that it is sampled *) ListPlot[lis] (*interpolate it with a 6'th order polynomial *) interpolated = Interpolation[lis, InterpolationOrder -> 6] (* now the variable "interpolated" behaves like any other continuous function, but only in the range 0 to 5 *) Plot[interpolated[t], {t, 0, 5}] (* now you can sample the interpolated function The line below gives you 5001 samples although the number of original samples was 101*) Table[interpolated[t], {t, 0, 5, 0.001}] good luck yehuda URL: ,

 Subject (listing for 'how to sample values from a listPlot') Author Date Posted how to sample values from a listPlot Rashide Ahmed 09/22/07 6:22pm Re: how to sample values from a listPlot yehuda ben-s... 09/23/07 11:47am Re: Re: how to sample values from a listPlot Rashide Ahmed 09/23/07 10:05pm Re: Re: Re: how to sample values from a listPlot matt prior 09/24/07 10:33am
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic