How to make 2 histograms in one plot, containing large data

Hi, I am trying to create a comparison plot- histograms of the temperature (its 2 files with 360 positions each) for 2 different cities in one figure. I created two variables: braT and pariT. Everything works when I make a histogram for each of them separately. I tried hold on command but there is an error:
figure(1)
hold on;
hist(braT,"FaceColor",[0,0,1]);
hist(pariT,"FaceColor",[1,0,0]);
Error using hist (line 53)
Input arguments must be numeric.
I tried creating one hist(braT) and add data of pariT but it doesnt create other bars. I want to get 2 bars next to each other, in different colors, representing temperature for 2 cities. The files in attachement.

Réponses (2)

TADA
TADA le 10 Nov 2018
hist accepts only the data and number of bins and no name-value options, which is the source of your error. Not to mention that it's deprecated.

Produits

Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by