Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Re: [mg6852] How to rebase a List of Values?
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Andrei Constantinescu

Posts: 32
Registered: 12/7/04
Re: [mg6852] How to rebase a List of Values?
Posted: Apr 25, 1997 2:00 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Try something like:

f[ l_List, a_ ] := Map[ {#[[1]], #[[2]] a } & , l ]

which will amplify your y-values with a !

Exemple:

In[1]:= l = Table[ {i, Sin[i] } , {i, 1, 10} ]

Out[1]= {{1, Sin[1]}, {2, Sin[2]}, {3, Sin[3]}, {4, Sin[4]}, {5, Sin[5]},

> {6, Sin[6]}, {7, Sin[7]}, {8, Sin[8]}, {9, Sin[9]}, {10, Sin[10]}}

In[3]:= f[ l_List, a_ ] := Map[ {#[[1]], #[[2]] a } & , l ]

In[4]:= f[l, 10]

Out[4]= {{1, 10 Sin[1]}, {2, 10 Sin[2]}, {3, 10 Sin[3]}, {4, 10 Sin[4]},

> {5, 10 Sin[5]}, {6, 10 Sin[6]}, {7, 10 Sin[7]}, {8, 10 Sin[8]},

> {9, 10 Sin[9]}, {10, 10 Sin[10]}}


Reagrds,

Andrei






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.