Error plot Bar graph

20 vues (au cours des 30 derniers jours)
Guilherme Lopes de Campos
Guilherme Lopes de Campos le 19 Fév 2019
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

Réponse acceptée

Sajeer Modavan
Sajeer Modavan le 20 Mar 2019
for using bar function you have to give M-by-N matrix
X = randi([1 100],27,2);
bar(X)
  2 commentaires
Sajeer Modavan
Sajeer Modavan le 24 Mar 2019
did you able to solve it
Guilherme Lopes de Campos
Guilherme Lopes de Campos le 24 Mar 2019
Hi Mohamed,
It worked,
Thank you very much for help,
My apologies for late to answer,
Guilherme Lopes de Campos

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by