Which numeric type works for function table()?

1 view (last 30 days)
The data I want to put into table were originally double, and I used the table function on them and I got:
Undefined function 'table' for input arguments of type 'double'.
I used the single() function to convert them into single numeric type and then use table function but then I Get this:
Undefined function 'table' for input arguments of type 'single'.
Which numeric type works for the table function, and how to convert data to it?
OR, is there a way I can use table() while still preserving the numbers as double?

Accepted Answer

per isakson
per isakson on 19 Dec 2014
Edited: per isakson on 20 Dec 2014
Which release do you have? table appeared in R2013b or R2014a.
I have R2013a and R2014a installed.
In R2013a table is not available. For an example of table, Create table from workspace variables it returned
Undefined function 'table' for input arguments of type 'cell'.
With R2014a I can run the examples and create tables with both double and uint16 (and all the rest - I guess)
&nbsp
See also dataset in the Statistic Toolbox, which is a predecessor to table. dataset appeared several years ago. Doc says:
The dataset data type might be removed in a future release. To work
with heterogeneous data, use the MATLAB® table data type instead. See
MATLAB table documentation for more information.

More Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!