Matlab输出dat文件并使用Tecplot绘制云图【部分功能】
function RunTecplot3D_Matrix(p,t,Matrix,datName)
output_dat_file(p,t,Matrix,datName)
mcrName = 'ddx_tec360.mcr';
batName = 'ddx_tec360.bat';
output_Mcr_file(datName,mcrName)
tec360Path = '"E:Tecplot 360 EX 2017 R3Tecplot 360 EX 2017 R3in ec360.exe"';
output_bat_file(tec360Path,mcrName,batName)
winopen(batName)
function output_dat_file(p,t,Matrix,datName)
% --------- p should be 3*N or N*3 ----------------------------
% --------- T should be 4*N or N*4 or 8*N or N*8---------------
% --------- Matrix should be x*N or x*N or 0 ------------------
...这段不是我想的...不宜发布
function output_Mcr_file(datName,mcrName)
fid = fopen(mcrName,'w');
fprintf(fid,'#!MC 1410
');
fprintf(fid,'%s%s%s%s%s%s
','$!ReadDataSet ',"'",'"',fullfile(pwd,datName),'"',"'");
fprintf(fid,'$!FieldMap [1] Surfaces{SurfacesToPlot = BoundaryFaces}
');
fprintf(fid,'$!FieldLayers ShowMesh = Yes
');
fprintf(fid,'$!FieldLayers ShowContour = Yes
');
fprintf(fid,'$!RedrawAll
');
fclose(fid);
function output_bat_file(tec360Path,mcrName,batName)
fid = fopen(batName,'w');
str = [tec360Path,' ',mcrName];
fprintf(fid, '%s', str );
fclose(fid);
```
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END



















暂无评论内容