matlab中直方图的绘制方法

来源:互联网 发布:温州动车事故 知乎 编辑:程序博客网 时间:2024/04/30 07:27
matlab中直方图的绘制方法:
 
  1. 核心函数 imhist()
    使用imhist()直接绘制直方图。
  2. 使用bar函数绘制直方图
    例如:
    >>  h=imhist(f)
    >>  h1= h(1:10:256)
    >>  horz=1:10:256
    >>  bar(horz,h1)
    bar函数的格式为:   bar( horz,v,width)  width的默认值是0.8
     
  3. 使用stem函数绘制直方图
    在上面的基础上,可以使用如下的方式:
    语法:  stem(horz,v,'color_linestyle_marker','fill')

    >> h=imhist(f);
    >> h1=h(1:10:256);
    >> horz=1:10:256;
    >> stem(horz,h1,'fill')
    >> axis([0 255],[0 15000])
    >> set(gca,'xtick',[0:50:255])
    >> set(gca,'ytick',[0:2000:15000])


  4. 使用plot函数绘制直方图

需要注意一些绘制图形常用的方法:

title(' xxx ') :设置标题

axis([horzmin horzmax vertmin vertmax]):设置坐标轴

text(xloc,yloc,'text string','fontsize',size): 前两个参数指定字符位置,后便参数指定大小等。


 

阅读(1239) | 评论(0) | 转发(0) |
0

上一篇:matlab函数模版

下一篇:关于“嵌入式系统设计师”的了结。

相关热门文章
  • Android应用之访问servlet服务...
  • 牌九透视眼镜 扑克
  • 武汉麻将透视眼镜 黄金色子...
  • 武汉邮局代收货款 湿疹...
  • www.fenghuangyulepingtai.com...
  • 承接自动化测试培训、外包、实...
  • Solaris PowerTOP 1.0 发布
  • For STKMonitor
  • 项目小体会
  • 不用学的汉字输入法 智能H3输...
  • 欢迎qq159135在ChinaUnix博客...
  • 欢迎szhsfw在ChinaUnix博客安...
  • 欢迎seowping在ChinaUnix博客...
  • 欢迎QuickLock在ChinaUnix博客...
  • 3. DB2 Control Center
给主人留下些什么吧!~~
原创粉丝点击