I am trying to take a free-form input Function
to create a list using NestList
.
Manipulate[list2 = NestList[f, .8, 10], {f, (1/3) x^3, InputField[_, String]},
ControlType -> InputField]
Which generates this output:
{0.8, ((x^3)/3)[0.8], ((x^3)/3)[((x^3)/3)[0.8]], ((x^3)/ 3)[((x^3)/3)[((x^3)/3)[0.8]]], ((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]], ((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]]], ((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]]]], (( x^3)/3)[((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]]]]], (( x^3)/3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]]]]]], ((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]]]]]]], ((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/ 3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[((x^3)/3)[0.8]]]]]]]]]]}
I would like to have a numeric output.
x
does not mean anything in this form. Try(1/3) #^3 &
$\endgroup$