tubulate()无法正常工作

20次观看(最近30天)
Binzi Shu
Binzi Shu 2016年3月2日
回答: Kafayat Olayinka2020年2月29日
我有一个表,我尝试将表的一列制成表格,例如列的名称为“价格”。该列的值为0,30,60和90。我想查看频率计数。但是,当我说“表格(table.price)”时,它将返回一个错误“未定义的函数'tabulate'对于类型'single'的输入参数”。这也发生在其他数据类型的情况下,例如“未定义函数'tabulate'类型'int8'“”,未定义的函数'tabulate'的输入参数'用于类型'分类'的输入参数,等等。()可以继续工作,我该如何解决这个问题?谢谢。

答案(2)

凯文·克莱托(Kevin Claytor)
这听起来像你don't have the tabulate function. This is included with the stats + machine learining toolbox. Can you paste the output of the "ver" command into a reply?
如果您只需要直方图计数,请考虑:
[计数,中心] = hist(table.variablename)
2条评论
凯文·克莱托(Kevin Claytor)
在这种情况下,您可能会使用其他功能或变量过度骑行。您可以在错误之前停止代码(例如,使用断点)并从以下方式复制输出。
>>哪个表格
and
>>谁表

登录发表评论。


Kafayat Olayinka
Kafayat Olayinka 2020年2月29日
价格=[0,30岁,30岁,60岁,60岁,90];
tab =表(价格);
选项卡的输出:
价格计数%
0 1.0000 16.6667
30.0000 2.0000 33.3333
60.0000 2.0000 33.3333
90.0000 1.0000 16.6667
绘图(TAB(:,1),TAB(:,2));

标签

社区寻宝

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

Start Hunting!