From: Ryan Utz on
Hi all,

I've imported some data that comes in cell format, some of it is classified as 'int32' and others are 'double'. I need to convert this to a matrix, however, because of the differing formats (though all columns are numbers) it won't let me do it. I'd be happy converting everything in the cell to 'double' format (to keep all of the decimal places for the data that matters). Any tips on how to do this?!

Thanks!
Ryan
From: Walter Roberson on
Ryan Utz wrote:

> I've imported some data that comes in cell format, some of it is
> classified as 'int32' and others are 'double'. I need to convert this to
> a matrix, however, because of the differing formats (though all columns
> are numbers) it won't let me do it. I'd be happy converting everything
> in the cell to 'double' format (to keep all of the decimal places for
> the data that matters). Any tips on how to do this?!

Perhaps
cell2mat(cellfunc(@double,TheCell))
From: us on
"Ryan Utz" <rutz(a)al.umces.edu> wrote in message <hv6b7t$p3k$1(a)fred.mathworks.com>...
> Hi all,
>
> I've imported some data that comes in cell format, some of it is classified as 'int32' and others are 'double'. I need to convert this to a matrix, however, because of the differing formats (though all columns are numbers) it won't let me do it. I'd be happy converting everything in the cell to 'double' format (to keep all of the decimal places for the data that matters). Any tips on how to do this?!
>
> Thanks!
> Ryan

that sounds strange as ML usually (intrinsically) takes care of conversions for differing data types...
can you show a small(!) example(?)...

us
From: Ryan Utz on
Not sure I can provide an example... this is data imported from Microsoft Access. If the data are all formatted to integers or double, there is no issue. However, if there is a disparity, even if all of the data are numbers, it doesn't work as I described. And the cellfunc(@double,TheCell) didn't seem to work...

>
> that sounds strange as ML usually (intrinsically) takes care of conversions for differing data types...
> can you show a small(!) example(?)...
>
> us
From: us on
"Ryan Utz" <rutz(a)al.umces.edu> wrote in message <hv6e5k$p3j$1(a)fred.mathworks.com>...
> Not sure I can provide an example... this is data imported from Microsoft Access. If the data are all formatted to integers or double, there is no issue. However, if there is a disparity, even if all of the data are numbers, it doesn't work as I described. And the cellfunc(@double,TheCell) didn't seem to work...
>
> >
> > that sounds strange as ML usually (intrinsically) takes care of conversions for differing data types...
> > can you show a small(!) example(?)...
> >
> > us

first of all: do NOT top-post...
then, CSSMers knew the CELLFUN would not work as it is not necessary (because ML takes care of such conversions)...
however, how come you're not able to show an example(?)...
how - do you think - could CSSMers possibly of any help without this vital information...

us