MATLAB: Can I change this

MATLAB

I have array_X
array_X=[1,1,1,0,1,0,0,0,1,0]
i want to change to
like this.
ans =
'1110100010'
how to change this?

Best Answer

k = num2str(array_X) ; % convert to string
k(k ==' ') = [] ; % remove spaces
There will be more other elegant ways.