I'm new to the forum, but I need some assistance with a program I am trying to write. I found a similar program, but it was using a one-dimensional array and my instructions need me to do it with a two-dimensional array.
A railroad track has a spur line that is a dead end. However, at the end of the line there is a railroad bumper that has been designed to stop a moving railroad car. At impact, the horizontal displacement in meters and the velocity in meters per second of the bumper as a function of time is given by:
displacement=4.219(e^(-1.58t)-e^(-6.32t))
velocity=26.67e^(-6.32t)-6.67e^(-1.58t)
DESCRIPTION OF VARIABLES:
NAME | TYPE | DESCRIPTION
-----------------------------------------------------------------------------
bumper | double | two-dimensional array of bumper impact values
time | int | time output in seconds
dis | int | displacement output in meters
velo | int | velocity output in meters per second
i | int | outer loop control variable
j | int | inner loop control variable
ndata | int | number of time data inputs
*******************************************************************************/