MATLAB Bar Command

From ControlTheoryPro.com

Jump to: navigation, search
Symbol.gif
MATLAB Bar Command
Green carrot left.gif
All MATLAB Articles MATLAB's Figure Command
Green carrot.jpg
In order to prevent spam, users must register before they can edit or create articles.


1 Introduction

The bar command plots a bar graph to the current figure.


MATLAB's Bar Chart Help

2 Basic Usage

The basic syntax of the bar command is the same as the plot command.

 >> bar(x, y)

For use with the hist command

 >> [n, xout] = hist(data);
 >> figure;
 >> bar(xout, n);

3 See Also