- #1
Toni103
- 12
- 0
As in the title I have a MATLAB graph. Its a bar chart with two sets of data done in matrix form. When I try and put in error bars the way I'm used to they both go on but in the middle of the two sets of data. Any way I can make them appear over the actual bars? Any help greatly appreciated!
The code I have so far is:
close all
clear;
clc
Under = [ 5.46, 2.02, 1.17];
Outside = [7.23, 3.99, 3.2];
E = [1.162, 1.162, 1.162];
data = [Under; Outside];
Matrix = (data');
%size (Matrix)
figure (1);
bar(Matrix); hold on
errorbar(Under ,E, 'ks');
errorbar(Outside, E, 'ks');
ylabel('SNR');
xlabel('Layers of tape');
title('Optimised Settings');
The code I have so far is:
close all
clear;
clc
Under = [ 5.46, 2.02, 1.17];
Outside = [7.23, 3.99, 3.2];
E = [1.162, 1.162, 1.162];
data = [Under; Outside];
Matrix = (data');
%size (Matrix)
figure (1);
bar(Matrix); hold on
errorbar(Under ,E, 'ks');
errorbar(Outside, E, 'ks');
ylabel('SNR');
xlabel('Layers of tape');
title('Optimised Settings');