Having issues producing bar chart
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Siddharth Satishchandran
il 20 Giu 2021
Commentato: the cyclist
il 20 Giu 2021
I am producing a bar chart from extracted data of mean call rates of three individuals. The code I am using is
bar(categorical({'ID 1','ID 2','ID 3'}),[mn1 mn2 mn3])
xlabel(Animal ID''s')
ylabel('Mean Call Rate')
title('Mean Call Rate for Animal IDs')
An error was produced but I thought I wrote the code correctly:
bar(categorical({'ID 1','ID 2','ID 3'}),[mn1 mn2 mn3])xlabel(Animal ID''s')ylabel('Mean Call Rate')title('Mean Call Rate for Animal IDs')
↑
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parantheses
Could you please let me know which area of the code is incorrect so i can change it and produce the bar chart?
0 Commenti
Risposta accettata
the cyclist
il 20 Giu 2021
Modificato: the cyclist
il 20 Giu 2021
I assume you got error from this line:
xlabel(Animal ID''s')
You have mismatched single quotes, i.e. "unbalanced delimiters", as the error says. It should be
xlabel('Animal ID''s')
Più risposte (1)
Siddharth Satishchandran
il 20 Giu 2021
1 Commento
the cyclist
il 20 Giu 2021
In the future, I would suggest openining a new question, when it is completely unrelated to the current one. Notice your new question looks like an "Answer" to your original one, which will be confusing to other users.
Vedere anche
Categorie
Scopri di più su Bar Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!