Re: How to rebase a List of Values?
- To: mathgroup at smc.vnet.net
- Subject: [mg6933] [mg6898] Re: [mg6852] How to rebase a List of Values?
- From: b5hafa at rz.uni-jena.de (Fabian Haas)
- Date: Tue, 29 Apr 1997 20:48:14 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
>Say I have one List containing values from 1000 to 5000 and a second from >30 to 70. >I want to rebase those lists at 100 so the two will show on a graphic with >the same scale. >Does anybody knows a simple way to rebase a list of values? > >Patrick Not sure if I get it right, but express the values as percent of the maximum value. So 1000 to 5000 will end up as 0.2 to 1. In code it should work like this: k = Max[ list ] newlist = Map[ #/k& list] or simpler newlist = list/k Fabian ------------------------------------------------------------------------- Dipl.Biol. Fabian Haas, MPhil Institut für Spezielle Zoologie und Evolutionsbiologie Erbertstr. 1 D-07743 Jena Deutschland / Germany TEL ++ 49 361 630 424 FAX ++ 49 361 630 392 :-) (-: -------------------------------------------------------------------------