How to plot equal equation at with 2 variable at each side. hard to simplift
3 views (last 30 days)
Show older comments
% 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')
0 Comments
Answers (1)
Torsten
on 14 Oct 2022
Edited: Torsten
on 14 Oct 2022
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')
0 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!