Plotting multiple graphs in one plot

2 ビュー (過去 30 日間)
Abdulrahman Alotibi
Abdulrahman Alotibi 2023 年 5 月 31 日
回答済み: VBBV 2023 年 5 月 31 日
Hi, I want to plot the (PR) vs. the (PR_ave) where (PR)changes daily while (PR_ave) is the aferage of the (PR), please change the code below to the desired goal, thank you
I want the code to produce a plot like this:-
PR = (Md_MSF_seclatent_steam)./(Ncqsum); % Performance Ratio
PR_ave=sum(PR)/365; % Average Performance Ratio
plot(PR,PR_ave);
ylabel("PR")
xlabel("Days")
title("Performance Ratio profile")

回答 (1 件)

VBBV
VBBV 2023 年 5 月 31 日
% PR = (Md_MSF_seclatent_steam)./(Ncqsum); % Performance Ratio
PR = rand(365,1);
PR_ave=sum(PR)/365; % Average Performance Ratio
hold on
plot(PR)
plot(PR_ave*ones(1,365));
ylabel("PR")
xlabel("Days")
title("Performance Ratio profile")
legend('PR','PR-ave')

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by