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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by