The ability to use scalar for error bar length in ERRORBAR is not available in MATLAB 7.9 (R2009b).
To work around this issue, download the attached version of the MATLAB file. Here are the steps:
1. Find the $MATLABROOT directory where $MATLABROOT is the MATLAB root directory on your machine, as returned by typing
at the MATLAB Command Prompt.
2. Quit MATLAB.
3. Download the attached file. Place the new file in the directory $MATLABROOT\toolbox\matlab\specgraph\
4. Restart MATLAB
5. After restarting MATLAB, issue the following command at the MATLAB Command Prompt:
6. The following code will now plot all error bars with the same length:
X = 0:pi/10:pi;
Y = sin(X);
E = 0.371;
dt_errorbar(X,Y,E)
Best Answer