MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

pure function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87332] pure function
  • From: haitomi <tpnycity at yahoo.com>
  • Date: Tue, 8 Apr 2008 05:34:52 -0400 (EDT)

Hello All,

I need help with two pure functions

1)  Li[Ranlist,x] that return a list of x element selected at random from Ranlist.  (Is there any way to gennerate random from Ranlist? I have RanList=Range[-100,100])

2) the function 4Sumf[x] is computing the sum of 4 squares of x. If I have x=1, this function will gennerate 1^2+0^2+0^2+0^2, if x=4 then 2^2+0^2+0^2+0^2, if x=7 2^2+1^2+1^2+1^2

Is anyone out there have any idea?
Thanks All,
Tomi


  • Prev by Date: Special Characters in Vista
  • Next by Date: Problems with recursive function
  • Previous by thread: Re: Re: Special Characters in Vista
  • Next by thread: Re: pure function