MATLAB: Error plot Bar graph

graphMATLAB

Hi MATLAB community,
I am trying create a bar graph, but show the follows error message:
X = table2array(valoresextremos); % size matriz (27,2)
x = X(:,1); 27 lines
y = X(:,2); 27 lines
bar(x,y)
Error using bar (line 191)
XData values must be unique.
Error in valores_extremos_grafico (line 4)
bar(x,y)
Could help me ?
Thank
Guilherme

Best Answer

for using bar function you have to give M-by-N matrix
X = randi([1 100],27,2);
bar(X)