Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by cubsfan334

  1. cubsfan334

    Recursion?

    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.
  2. cubsfan334

    Recursion?

    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...
  3. cubsfan334

    Do Loops -- Real Step Size

    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...
  4. cubsfan334

    Do Loops -- Real Step Size

    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

Part and Inventory Search

Back
Top