Which numeric type works for function table()?

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

per isakson
per isakson il 19 Dic 2014
Modificato: per isakson il 20 Dic 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.

Più risposte (0)

Categorie

Scopri di più su Tables in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by