Matlab输出dat文件并使用Tecplot绘制云图【部分功能】

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
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容