iteration list
Hello, I want the series of sequential sum of a list of numbers.
like,
{1,2,3,4,5} -> {1,3,6,10,15}
I can use iteration list with a custom tool, like in the file attached. It works.
But if I attempt to define the expression directly, like:
IterationList({Element(p,1)+1, Element(L_1, Element(p, 1))+Element(p,2)}, p, {{1, 0}}, Length(L_1) - 1)
then strange things happen!
First, nothing happens, no error message but also no new object is created (defined of undefined). As if I had not typed anything!
But then, it becomes impossible to make any input with the mouse: no new point can be created!
On the other hand, as you can see in the file attached, iteration (NOT iterationlist) works without recourse to custom tool:
Iteration({Element(p,1)+1, Element(L_1, Element(p, 1))+Element(p,2)}, p, {{1, 0}}, Length(L_1) - 1)
gives the proper result.
This problem with iteration list did happen repeatedly in a complicated file, and eventually it seems I have isolated the problem.
Any advice would be welcome.
it works fine for me
GeoGebra Classic 5.0.486.0-d (Java 1.8.0_161-32bit, 247MB. CAS Initialising) 18 August 2018
Hello,
I have made system that can add and remove vectors at will from a list, not necessarily by erasing them, just by clicking on them, ON/OFF type. This ON/OFF system allows easy removal of a tag applied by mistake, without having to erase the vector, that could be part of another construction. The file is very stable it seems. (see file "delete duplicates e.ggb" below).
However, as soon as I add the calculation of the resultant of forces (for which iteration is required), the file becomes extremely unstable. Almost 50% of the time, the file doesn't open again after being saved. (see file "delete duplicates with resultant.ggb")
It seems as if there was an unwanted interference between the list of object names "text" (n), utilising iterationlist, and the iteration that calculates the force resultant, utilising iteration.
Is GGB overwhelmed by too much use of iterations?
The only alternative is to use the spreadsheet, but this would be complicated, first because it involves fixing in advance the maximum number of forces, and second because it would be very difficult to organise 3 to 4 different catenaries in the same worksheet. So iteration is much more pliable. If it works...
Thanks,
Laurent
try element(points10,1) instead points10(1) in iteraton command
sometimes the short version of element command does not work
Comments have been locked on this page!