How to plot equal equation at with 2 variable at each side. hard to simplift

3 ビュー (過去 30 日間)
Qin
Qin 2022 年 10 月 14 日
編集済み: Torsten 2022 年 10 月 14 日
% Plot the graph of Relatioship between Ts and Albedo
albedo = 0 : 0.05 : 1;
-900.*(1-albedo)==332.5-(y.^4).*(5.3865*10^-8)-((y-294.15)./3)-((306.15-y)./0.016);
plot(albedo,y);grid;
title ('Relatioship between Ts and Albedo')
xlabel('Albedo Percentage (%)')
ylabel('Temperature (K)')
legend('Roof Surface Temperature')

回答 (1 件)

Torsten
Torsten 2022 年 10 月 14 日
編集済み: Torsten 2022 年 10 月 14 日
For each value of albedo, you get 4 values for y that satisfy
-900.*(1-albedo)==332.5-(y.^4).*(5.3865*10^-8)-((y-294.15)./3)-((306.15-y)./0.016);
It's up to you to decide which value is the correct one for your purpose.
% Plot the graph of Relatioship between Ts and Albedo
albedo = 0 : 0.05 : 1;
for i=1:numel(albedo)
y = roots([-5.3865*10^-8 0 0 -1/3+1/0.016 900.*(1-albedo(i))+332.5+294.15/3-306.15/0.016]);
error = -900.*(1-albedo(i))-(332.5-(y.^4).*(5.3865*10^-8)-((y-294.15)./3)-((306.15-y)./0.016));
Y3(i) = y(3);
Y4(i) = y(4);
end
plot(albedo,[Y3;Y4]);grid;
title ('Relatioship between Ts and Albedo')
xlabel('Albedo Percentage (%)')
ylabel('Temperature (K)')
legend('Roof Surface Temperature')

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by