MATLAB: Converting cell array to matrix

converting cell array to matrix

I have a cell array a = {'a' , 'b' , 'c' ,'d' , 'e'}
I need to convert a cell array to matix with ','(comma in between)
my answer should be a = a,b,c,d,e
how can i do it?
thanks a lot

Best Answer

a = {'a' , 'b' , 'c' ,'d' , 'e'};
a = sprintf('%c,',[a{:}]);
a = a(1:end-1);