Extending command Iteration to functions : list -> list
Under Consideration
Hello,
I'm looking for possibilities to do recursive tools. I had the following idea : imaging that the Iteration command is extended to "functions" that take a list a return a list. We should then be able to perform the sum of a list, e.g. this way :
L1 is a list
f(L1)=If[Length[L1]==1, L1, Sequence[Element[L1,i]+If[i==Length[L1]-1,Element[L1,Length[L1]],0],i,1,Length[L1]-1]]
(replace the n-1 element by the sum of n-1 and n elements)
s=Element[Iteration[f,L1,Length[L1]],1]
(returns the sum)
Best regards,
Mathieu
ps : It would be a way to extend R->R funtions to R^n->R^m functions...
is GG ready for this? or do we must to use custom tools ever?
I know how to do an iteration; I am speaking about functions list--->list
how to iterate f(x,y)=(x^2-y^2+1,2x y) for mandelbrot, ie
we can do a custom tool with {u,v} input and {u^2-v^2,2u v} output then iteration or reproduce all the process in one iteration command but I think is very complex
It is possible to do that using custom tools, like I did here:
https://help.geogebra.org/t...
The funicular curve is built using iterationlist applied on a custom tool taking a list as input and returning a list as output. It works, but custom tools are a little fussy about the types of parameters that are transmitted, (for example a vector-based construction might loose the origin point of vectors when they are transmitted as parameters in the custom tool ), so it has to be tested carefully.
better if the tool has two points in input and output, or segment-->segment
https://help.geogebra.org/t...
Comments have been locked on this page!