I have written code that determines three variables that are related to each other. I want to step through these calculations for “n” iterations, but don’t know how to do this in multiple variables.
The variables (and their dependencies) are:
Torque (as a function of angle)
Angle (as a function of torque, previous angle, and angular velocity)
Angular Velocity (as a function of torque and previous angular velocity)
I calculate these values in the order above (torque, angle, angular velocity) pulling the dependent data from a list for each variable that I append the new data to at the end of each iteration.
Whenever I try to set up a looping structure to perform this calculation multiple times, I get recursion errors. If anyone has some ideas, I’d really appreciate it. Sample code would be even better!
Thanks,
Matt