kindly correct me in my loop
Ältere Kommentare anzeigen
prompt = 'What is the value of Area, A? ';
A = input(prompt)
prompt = 'What is the value of Heat Transfer Coefficient, h? ';
h = input(prompt)
prompt = 'What is the value of Temperature of System, Ts? ';
Ts = input(prompt)
prompt = 'What is the value of Temperature of Surroudings, Tf? ';
Tf = input(prompt)
prompt = 'What is the value of mass, m? ';
m = input(prompt)
prompt = 'What is the value of Heat Capacity, c? ';
c = input(prompt)
prompt = 'What is the value of time interval, dt? ';
dt = input(prompt)
t = 0
prompt = 'What is the value of time at the end, tend? ';
tend = input(prompt)
while t<tend
for t == 0:t == dt:t == tend
qs = - A*h*(Ts - Tf)
Q = qs*dt
Tn = (Q/(m*c)) + Ts
t = t+dt
end
Ts = Tn
end
1 Kommentar
Image Analyst
am 4 Feb. 2020
What values did you enter?
Antworten (2)
Nishaben Desai
am 5 Feb. 2020
0 Stimmen
Nishaben Desai
am 5 Feb. 2020
0 Stimmen
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!