animate_bending_tri.m
来自「结构力学中的有限元例子,包含了7个分类文件夹」· M 代码 · 共 24 行
M
24 行
function animate_bending_tri (resp,in_data);
% cd D:\matlabR12\work\fem\anim\4;
dofN = 3; % dof's per node
dof_ = size(in_data.ND)*dofN;
warning off;
XXX = max(max(abs( resp.dynamic.DYN_D(:,1:dofN:end))));
for k=1:size(resp.dynamic.DYN_D,1)
% plot_bend_tri ( in_data, resp, resp.DYN_D(k,:), dof_, LOAD_, CON, 110);
plot_dyn_tri ( in_data, resp, k, dof_, XXX, 110) ;
% plot_bend_tri ( in_data, resp, dof, NF)
jo = num2str(in_data.dynam.delta_tm*k); jo = strcat(jo, ' s'); % time, s
title(jo); hold off;
pause(.001);
% write movie 'M' (<300) frames into jpg files
if k<100 A='a'; end; if k<200 & k>=100 A='b'; end;
if k<300 & k>=200 A='c'; end;
eXt='.jpg'; B=strcat(A,int2str(k),eXt);
% print('-djpeg','-r40',B);
% hold on;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?