Question: simple procedure won't work... not sure why

Below is a small tidbit of code that operates on the matrix vel and updates its values.  When I check the values of the indices in the matrix, every single element, barring vel(1,1), vel(1,2), and vel(1,3), is equal to 0.

vel := Matrix(3, 241, datatype = float[8]);

step := 0.1;

vel(1, 1) := 5; vel(2, 1) := 95; vel(3, 1) := 3;

UpdateAllVelocities := proc (i, vel::Matrix, accel::Matrix, step);

#I understand these calls are quite pointless... I only set every single element of the matrix equal to the first elements in an attempt to isolate the cause of my runtime error.

vel(1, i) := vel(1, 1); 

vel(2, i) := vel(2, 1);

vel(3, i) := vel(3, 1);

end proc;

for i from 1 to 241 do

UpdateAllVelocities(i, vel, accel, step);

end do;

Does anyone see what simple mistake is causing this problem?

Thank you in advance.

Please Wait...