Goal:
To create 3 randomly generated arrays, one representing an x-coordinate value, a y-coordinate value, and a height value. All three arrays will have the indicies in common (i.e. if you are looking at index 5 of the height array, the corresponding x/y values will be located in index 5 of both arrays). I want to be able then filter out the height values that are less than 15, along with their related x/y values. So the only points that remain, are the points with a height greater than 15.
My approach has been...
1. Randomly generate 3 arrays
2. Search for height values >15
A. If >15, append x/y values to new coordinate array
B. If <15, append 0,0 values to new coordinate array
3. Search new coordinate array for 0,0 values, then delete
Problem:
For some reason... could be very simple, if there are two values that are read (back to back) as 0,0, then the program will fail to delete the index. But if there is only one read, then the index will be successfully deleted.
If someone could help me out with this problem, or might have some other suggestions about how to solve the problem, that would be great.