- #1
dropdeadmarc
- 4
- 0
Homework Statement
I've been given a Heat transfer problem, which I must solve in Matlab.
The code should output the results and a graph of the temperature variation within the wall.
Also the code needs to be able to run and output these results without any further user manipulation to the graphs via the mouse. All commands in a ".m" file.
Homework Equations
hold on;
plot(t',h')
The Attempt at a Solution
I have no problem solving for the temperature change and rate of heat loss. I'm just having a problem with how to graph the temperature change versus the distance. I'm assuming it should be similar to the image supplied.
I figured I could do something like the following, where it would plot individual points:
hold on;
while t< the thickness of each transition
find temp
plot
t=t+.1
end
However, this is overly complicated and would take a lot of time to set up. The temperature change throughout each material is linear. So I would think that If I just calculate the temperature at the material change points, I could just plot those points, and then connect these points with lines.
Is there some syntax that would make this possible to code?
I tried searching online and using "help plot" but to no avail