Properties
Similar Topics
Statistics
Comments
36
Participants
4
Subscribers
4
Votes
3
Views
2030
Share

For loop over slider values then save the corresponding output of another variable
Answered
If I have an animating drawing where the the input is given by a slider whose name is RackDisplacement.
Without using the animation, I would like to :
1- save the values of a variable called SteeringAngle for the corresponding values of RackDisplacement in a spreadsheet using for loop
2- create another column in the spreadsheet with the title of OutputAngle which is given by the equation acotd( cotd(SteeringAngle) + 3/11)
3- plot a graph between RackDisplacement and OutputAngle
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Thanks mathmagic, I was looking for this command.
This makes the transfer to the spreadsheet clearer. (Attachment 4B_RackWithAngle.ggb)
.
But (1):
The performance goes down significantly. Especially when moving the slider "RackDisplacement" with the keyboard. I don't know exactly why, but I suspect that locAPf resp. locBPf is recalculated too often.
.
In the version "4C_RackWithAngle" I defined the two objects as free objects with loc..Pf(x)=x and in the update of loc..P (points list) I insert with SetValue() the function LineGraph(..) in loc..Pf. With this now the performance is normal.
But (2):
the script is executed with every movement from point A resp. B, so that my assumption above (recalculated too often) is disproved. Why the performance is nevertheless better remains one of the many GGB mysteries in the area of "when is what recalculated". If anyone in our galaxy really knows, a description would be very useful.
1) Please post your .ggb file
2) Maybe https://wiki.geogebra.org/e... is interesting
Try right-click on Steering Angle -> Record to Spreadsheet. Then move the slider with the arrow keys
alternative
without manual intervention and if the list in the spreadsheet is not needed
Solution approach with command Locus() (much easier)
Comments have been locked on this page!