从单元格值绘制直方图 [英] Plotting a histogram from cellvalues
本文介绍了从单元格值绘制直方图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个尺寸为100x1的整数元素的单元数组.如何根据这些数据绘制直方图?
I have a cellarray of dimension 100x1 of integer elements. How can I plot a histogram from this data?
推荐答案
首先使用cell2mat
转换为常规矩阵,然后使用hist
命令
Use cell2mat
to convert to regular matrix first, and them use hist
command
hist(cell2mat({1,2,3,10,10,10}))
这篇关于从单元格值绘制直方图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文