Which numeric type works for function table()?

1 Ansicht (letzte 30 Tage)
Muaaman
Muaaman am 18 Dez. 2014
Bearbeitet: per isakson am 20 Dez. 2014
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?

Akzeptierte Antwort

per isakson
per isakson am 19 Dez. 2014
Bearbeitet: per isakson am 20 Dez. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by