Transform String Into Array Javascript Length Function In Matlab