I'm not sure about the first code you posted, but I don't think the 2nd and 3rd will work. I think those simply plug n in for t and solve. What I need is the result for t=2 is dependent on the result of t=1, and the result of t=3 depends on the result of t=2, etc
If that makes sense.
Hi, I have one more question: How would I make a recursive function? For example I could have these equations:
a1 = (x1 - x2) * t
a2 = (y1 - y2) * t
x1f = 5 * a1
y1f = 5 * a2
I need a do loop that will calculate x1f and y1f when t=1, then plug in the previously generated xf1 for x1 and yf1...
Thanks for the responses guys, I had another question also -- I set a parameter for g, the gravatational constant = 6.673E-11. When I execute my program, however, I believe that the program rounds this to 0. Also, the output numbers are also rounded to whole numbers -- I need decimal places...
Hi, I'm new to Fortran and I'm running into trouble with do loops. I keep getting the error that the step size can only be an integer. I'd like to use a step size of .01 or .001. Why is this, and is there a way around it?
Thanks,
cubsfan
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.