Java While Loop Through Array Matlab Web Compiler