Plot multiple probability distribution function side by side

7 ビュー (過去 30 日間)
Telema Harry
Telema Harry 2021 年 4 月 23 日
コメント済み: Telema Harry 2021 年 4 月 23 日
Hello,
Please how can I plot the pdf shown in the attached picture.
I can easily plot one pdf but I don't know how to combine them
% My code is not giving me what I want.
pd = makedist('Normal')
x = -10:.1:10;
pdf_x = pdf(pd,x);
plot(x,pdf_x,'LineWidth',2)
hold on
y = -5:.1:6;
pdf_y = pdf(pd,y);
plot(y,pdf_y,'LineWidth',2)
hold off

採用された回答

Stephan
Stephan 2021 年 4 月 23 日
% My code is not giving me what I want.
pd1 = makedist('Normal')
pd1 =
NormalDistribution Normal distribution mu = 0 sigma = 1
pd2 = makedist('Normal',2,1)
pd2 =
NormalDistribution Normal distribution mu = 2 sigma = 1
x = -10:.1:10;
pdf_x = pdf(pd1,x);
plot(x,pdf_x,'LineWidth',2)
hold on
y = -5:.1:6;
pdf_y = pdf(pd2,y);
plot(y,pdf_y,'LineWidth',2)
hold off

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by