Swift Loop Through Array Matlab Plot