Re: modified list interval calculation
- To: mathgroup at smc.vnet.net
- Subject: [mg21058] Re: modified list interval calculation
- From: "Deborah Leddon " <Dleddon at students.cas.unt.edu>
- Date: Sun, 12 Dec 1999 23:51:23 -0500 (EST)
- Organization: University of North Texas
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I am having trouble with the problem below:
I am trying to remove from list, t, those numbers in list, nt, that
match and then I want to calculate the differences (intervals )
between succesive numbers in list, t, that do not contain the
removed number. For example:
the two lists are;
t = {1,4,4.5,6,7,8,8.9,9,10,12,140,16,16.8,17,18,
19,19.1,19.3,19.5,20}
nt = {8,8.9,10,17}
the resulting intervals would look like:
4 -1, 4.5 - 4, 6 - 4.5, 7 - 6, 140 -12, 16 - 140, 16.8 - 16, 19 - 18,
19.1 -19, 19.3 - 19.1, 19.5 - 19.3, 20 - 19.5
and of course the final list would be:
intervals = {3, .5, 1.5, 1, 128, -124, .8, 1, .1, .2, .2, .5};
Note that 9 was omitted from the calculation of intervals because it
would have been involved in a calculation with a removed number
from the list, t.
Thanks in advance if anyone can help.
Regards, Debbie
- Follow-Ups:
- Re: Re: modified list interval calculation
- From: Hartmut Wolf <hwolf@debis.com>
- Re: Re: modified list interval calculation