how to write a for loop that skips over things [message #91922] |
Tue, 15 September 2015 16:42  |
wdolan
Messages: 29 Registered: June 2015
|
Junior Member |
|
|
So I'm looping through about 300 different scans from a satellite. each scan has about 401 points in it. The array looks like btstruc.btresid [401,300]
I also have information that corresponds like the date ex. btstruc.date [300], or btstruc.latitude [300](which should say the latitude where the scan was taken)
but out of the three hundred scans, about 50 of them have no corresponding information, and the array just has zeroes or nulls depending on the array.
So as I loop through the scans if I come across one of the ones that has nulls or zeroes, I want to skip it, and continue looping through the next scans. What sort of for loop should I set up so that if I come across one of these scans, I don't just end the loop altogether, I just skip the scan.
Thanks! And let me know if you need clarification, I don't know if I explained it very well.
|
|
|
|