在mathematica中使用直方图时如何输出数据集 [英] how to output the data set when using histogram in mathematica

查看:35
本文介绍了在mathematica中使用直方图时如何输出数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Mma 中,Histogram 函数仅生成图形.我想知道如何获取数据集;有什么方便的内置函数吗?

In Mma, the Histogram function only generates graphics. I am wondering how I can to get the data set; is there any convenient built-in function for this?

非常感谢.

推荐答案

HistogramList 已添加到 Mathematica V8 以公开分箱和高度计算.

HistogramList was added to Mathematica V8 to expose the binning and height calculations.

HistogramList[a]

对于 V7,您可以修改第三个参数来获取 bin 和计数.

For V7 you can hack the third argument to get the bins and counts.

Histogram[a, Automatic, (Print[{##}]; #2) &]

这篇关于在mathematica中使用直方图时如何输出数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆