Thank you very much. I made a bunch of your changes to the program, and it definitely sped up. I did, however, omit the compiling because I don't really understand how it works, and I'm sure I can add it later.
Before I ask another question about the actual program, I was have a few simple ones about Maple in general:
1. How do I indent a single line... This is extremely frustrating.
2. Is there a syntax coloring, besides everything being red, similar to what other IDE's provide?
Firstly, I'll address the differential equation approach. I just discussed the idea with my Professor, and he noted that I will be dealing with 3 coupled differential equations (all of them depend on each other). I'm not sure if Maple can do this without intervention from the user. If my math skills were stronger, I would definitely give it a shot, but I just feel like I would frustrate myself in the end.
At the moment, I'm getting a compile error that says, "Error, final value in for loop must be numeric or character."
It then references a few functions.
I posted one of the functions and then the loop that calls them. I have a feeling it has to do with the way I passed the i value into the functions... actually, I'm pretty sure I get it. Since i is a variable name, I need a different restriction than posint. When i say i::name instead?
UpdateAllPositions := proc (i::posint, pos::Matrix, vel::Matrix, step::(float))
pos(1, i) := pos(1, i-1)+vel(1, i)*step;
pos(2, i) := pos(2, i-1)+vel(2, i)*step;
pos(3, i) := pos(3, i-1)+vel(3, i)*step;
for i from 2 to maxint do
UpdateAllAccelerations(i, accel, step);
UpdateAllVelocities (i, vel, accel, step);
UpdateAllPositions(i, pos, vel, step);
EDIT: solved that error. I accidentally used maxint instead of maxi.
EDIT2: Now it is telling me
"UpdateAllAccelerations expects its 3rd argument, step, to be of type float, but received .1"
If I declare step as step := .1, what type is it declared as? Clearly it isn't float.