[Jprogramming] finding roots
Robert O'Boyle
bcubed at accesswave.ca
Sun Mar 30 05:30:59 HKT 2008
Hi, Raul
That gave me a length error
Here is c and n
c =. 55634 19468 192823 106061 55066 150588 12466 2873 1253
n =. 541745 141620 807496 384765 183070 500638 41443.9 9551.44 4165.67
f, what we are looking for is
f =. 0.12 0.164 0.304 0.36 0.4 0.4 0.4 0.4 0.4
You also need m =. 0.2
The function is
FVPA =: 4 : 0
'c n' =. x
(c*(y+m))%(n*(1-^-(y+m)))
)
To find f for each pair of c and n in the two lists, I have executed
(c,: n) FVPA ^:_ (0.3)
(c,: n) FVPA ^:_"_1 (0.3) gives a length error
Is there a way to have the interpreter stop after the roots of pairs has
been determined?
Bob
-----Original Message-----
From: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] On Behalf Of Raul Miller
Sent: March 29, 2008 5:28 PM
To: Programming forum
Subject: Re: [Jprogramming] finding roots
I wrote:
> (C,:N) yourverb^:_"0 startvalues
Correction:
(C,:N) yourverb^:_"_1 startvalues
I was so concerned with copying the expression I forgot all
about the actual rank value.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list