フィルターのクリア

Plot approach to steady state solution

2 ビュー (過去 30 日間)
Jonathan Melia
Jonathan Melia 2020 年 5 月 17 日
コメント済み: Jonathan Melia 2020 年 5 月 20 日
figure(1)
title('Exact Steady State Temperature Profile')
hold on
plot(r_profile,Up_exact,'r-');
xlabel('r')
ylabel('T')
for i = 1:ceil(tau/dt)
Mplot(:,i) = U;
U = Atinv*(D*U+dt*B);
[Uedge, redge] = GetBHboundary(theMesh,3,U);
figure(2)
plot(redge, Uedge,'k')
axis([1 10 0 0.4])
title('FE Temperature Profile')
drawnow
pause(0.05)
end
I have the following code which plots my steady state temperature profile in figure 1 and an animated transient temperature profile in figure 2. Is there a way i can have them both in one plot showing how the transient solution approaches the steady state?
Thanks :)

採用された回答

Asvin Kumar
Asvin Kumar 2020 年 5 月 20 日
Can you give this a try?
figure
title('Exact Steady State Temperature Profile')
hold on
plot(r_profile,Up_exact,'r-');
xlabel('r')
ylabel('T')
ax = gca;
for i = 1:ceil(tau/dt)
Mplot(:,i) = U;
U = Atinv*(D*U+dt*B);
[Uedge, redge] = GetBHboundary(theMesh,3,U);
% figure(2)
plot(ax, redge, Uedge,'k')
axis([1 10 0 0.4])
title('FE Temperature Profile')
drawnow
pause(0.05)
end
  1 件のコメント
Jonathan Melia
Jonathan Melia 2020 年 5 月 20 日
worked perfectly thank you! :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by