Search:

Type: Posts; User: geezlouise

Search: Search took 0.13 seconds.

  1. Re: Need help with my code (physics pendulum)

    Well the variable that controls the while loop are anlgeIsZero and angleIsZeroNext.As long as they are equal to zero then the loop would continue...angleIsZero and angleIsZeroNext are basically...
  2. Re: Need help with my code (physics pendulum)

    int j = 0; // Index looping over time
    double angleIsZero = 0; // Storing the time when angle is zero

    while(angleIsZero == 0)
    {
    // If the angle switch sign...
  3. Re: Need help with my code (physics pendulum)

    I think I'm stuck in an infinite loop...this is what is written on line 169:




    if(angle[j]*angle[j+1]<0){
    // Choose the angle with the smallest magnitude
    angleIsZeroNext =...
  4. Re: Need help with my code (physics pendulum)

    Yeah..I don't understand what makes that happen though.And its out of bounds in what array?Is there a way to find out?
  5. Re: Need help with my code (physics pendulum)

    Hey thanks for your reply,Norm.So its kind of odd but I only get an out of bounds error when I change the drivingForce to anything but zero,my code works when its zero but i get an error whenever i...
  6. Need help with my code (physics pendulum)

    import java.io.*;

    public class omg
    {
    // Declare constants

    public static final double DT = 1e-2; // time interval in seconds
    public static final double Tmax = 1000.; //...
  7. Replies
    3
    Views
    201

    [SOLVED] Re: Quick little question

    Yes on the command line, and as a superscript.
  8. Replies
    3
    Views
    201

    [SOLVED] Quick little question

    Hey guys,just wanted to know if there is a way to make java display an exponent?I need to display a polynomial x^3-x-1.For now i just wrote it as xE3-x-1 but i wanted to know if there is a way to...
  9. Replies
    7
    Views
    446

    Re: Beginner,first java program assignment

    Thanks for your help Norm,you solved the error that I was having,now I will try to finish writing the program.I will post anything if something happens.
  10. Replies
    7
    Views
    446

    Re: Beginner,first java program assignment

    //Source listing for Assignment 1.

    import javax.swing.JOptionPane;

    public class Assignment1


    {
    public static void main(String[] args)
    {
  11. Replies
    7
    Views
    446

    Re: Beginner,first java program assignment

    Oh sorry I did not know about that.I will use that for future posts.Also,thanks for your input Starstreak, I think I know what you are trying to tell me...but its still not quite clear.I'm gonna try...
  12. Replies
    7
    Views
    446

    Beginner,first java program assignment

    Hey guys,I'm new to java programming and I am taking an introductory class to computer programming; and I am having trouble with our first assignment. Basically all I want my program to do is gather...
Results 1 to 12 of 12