Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5767 > unrolled thread

A basic question about RecurrenceTable - warning messages

Started byvictorphy <vbapst@gmail.com>
First post2011-10-21 11:30 +0000
Last post2011-10-22 10:17 +0000
Articles 2 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  A basic question about RecurrenceTable - warning messages victorphy <vbapst@gmail.com> - 2011-10-21 11:30 +0000
    Re: A basic question about RecurrenceTable - warning messages victorphy <vbapst@gmail.com> - 2011-10-22 10:17 +0000

#5767 — A basic question about RecurrenceTable - warning messages

Fromvictorphy <vbapst@gmail.com>
Date2011-10-21 11:30 +0000
SubjectA basic question about RecurrenceTable - warning messages
Message-ID<j7rl46$i8i$1@smc.vnet.net>
Hello,


I have a small and basic question about RecurrenceTable.

I would like to solve f(x,a)==0 where x is the unknown and a is a
parameter. As f has several zeros I want to follow one zero when
varying a.

Thus I write something like that :

f[x_,a_] :=  -(x - a)^3 + (x - a)

soltest[a_, b_] :=  x /. FindRoot[f[x, a], {x, b}]

RecurrenceTable[{a[n + 1] == soltest[n/10, a[n]], a[0] == -1}, a, {n,
10}]


I get the correct output but a lot of warning messages :

FindRoot::srect: "Value a[n] in search specification {x,a[n]} is not a
number or array of numbers
ReplaceAll::reps: "{FindRoot[f[x,n/10],{x,a[n]}]} is neither a list of
replacement rules nor a valid dispatch table, and so cannot be used
for replacing



Is there something that I am doing wrong ? Or is it just normal ?

Thank you very much for your answers.

Victor

[toc] | [next] | [standalone]


#5792

Fromvictorphy <vbapst@gmail.com>
Date2011-10-22 10:17 +0000
Message-ID<j7u57v$t99$1@smc.vnet.net>
In reply to#5767
On 21 oct, 13:30, victorphy <vba...@gmail.com> wrote:

> Thank you very much for your answers.
>

Ok it was quick I got an answer by mail. For the record here is what
needs to be done :

soltest[a_?NumericQ, b_?NumericQ] :=  x /. FindRoot[f[x, a], {x, b}]



Victor

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web