plotting 2 models on one histogram

2 ビュー (過去 30 日間)
Jonathan Louie
Jonathan Louie 2022 年 6 月 7 日
回答済み: the cyclist 2022 年 6 月 7 日
How would I do this:
In a different figure, plot the histograms of x_ar and x_nr on the same graph for the entire time series of the simulations. Normalize the representation of both histograms with the option ‘probability’. To facilitate the comparison of these two histograms use the same bin edges for each of them. We recommend using bins of 15 molecules ranging from 0 to 350 molecules. Add appropriate labels and a legend to your figure.

回答 (1 件)

the cyclist
the cyclist 2022 年 6 月 7 日
Here is a hint to get you started.
N = 1000;
x1 = randn(N,1);
x2 = randn(N,1) + 2;
figure
hold on
histogram(x1)
histogram(x2)
Everything else you need to do is described in the histogram documentation, I believe.

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by