Need help with matlab code

조회 수: 1 (최근 30일)
Emma K.
Emma K. 2021년 2월 2일
댓글: Star Strider 2021년 2월 4일
Need to numerically solve the differential equation below and plot T vs t which goes like radiative cooling curve.
dT/dt= -Q(T^4-T0^4)/3*L*T where T =1000K, T0=300K, Q=1.38e-23 and L=1e-4 m.
Thank you in advance!

채택된 답변

Star Strider
Star Strider 2021년 2월 2일
Tv=1000; % K
T0=300; % K
Q=1.38e-23;
L=1e-4; % m.
syms T(t)
DE = diff(T) == -Q*(Tv^4-T0^4)/3*L*T;
DEs = dsolve(DE, T(0)==T0)
figure
fplot(DEs, [0 1E+16])
grid
xlabel('$t$', 'Interpreter','latex')
ylabel('$T(t)$', 'Interpreter','latex')
title(['$T(t) = ' latex(DEs) '$'], 'Interpreter','latex')
Or, use ode45.
  댓글 수: 6
Emma K.
Emma K. 2021년 2월 4일
Thank you Strider, a little tweak helped resolved the problem.
Star Strider
Star Strider 2021년 2월 4일
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by