|
On Oct 28, 2:21=A0pm, Jason S <jmsa...@gmail.com> wrote:
> is there a function that converts an array of numbers to a cell array
> of strings?
> num2cell converts array of numbers -> cell array of numbers
> num2str converts array of numbers -> char array (but not cell array)
>
> I suppose I can do this easily, it just seems like an obvious idea for
> a builtin function
AFAIK there is no single function that can do this but as you said
it's easy enough to create your own:
>> data =3D num2cell([1:5]);
>> data =3D cellfun(@num2str,data,'UniformOutput',false)
data =3D
'1' '2' '3' '4' '5'
HTH,
Ashish.
|