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...
Type: Posts; User: geezlouise
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...
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...
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 =...
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?
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...
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.; //...