Matlab Check Empty Array Javascript Length