Which numeric type works for function table()?

1 回表示 (過去 30 日間)
Muaaman
Muaaman 2014 年 12 月 18 日
編集済み: per isakson 2014 年 12 月 20 日
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?

採用された回答

per isakson
per isakson 2014 年 12 月 19 日
編集済み: per isakson 2014 年 12 月 20 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by