show.m
来自「this fem program is written in matlab to」· M 代码 · 共 42 行
M
42 行
function show ( elements3, coordinates, U, nt, t_start, t_final,ntt,dt )
%plot temprature profile of the room with time
umin = min ( min ( U ) );
umax = max ( max ( U ) );
t_final1 = ntt*dt
for i = 0 : ntt
%
% Print the current time T to the command window, and in the plot title.
%
t = ( ( ntt - i ) * t_start ...
+ ( i ) * t_final1 ) ...
/ ntt;
fprintf ( 1, 'T = %f\n', t );
%
% TRISURF will display surface plots of X, Y, Z data
% that has been grouped into triangles.
%
picture = trisurf( elements3, coordinates(:,1), coordinates(:,2), ...
U(:,i+1)', 'EdgeColor', 'interp', 'FaceColor', 'interp' );%trisurf
%
% We want all the plots to use the same Z scale.
%
axis ( [0 1 0 1 umin umax] );
%
% Write some labels on the plot.
%
xlabel ( 'X axis' );
ylabel ( 'Y axis' );
s = sprintf ( 'T = %8f', t );
title ( s );
pause(0.05)
getframe;
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?