|
回复 板凳 nmdb 的帖子
请参考
fid0 = fopen('SysnoiseScript.txt','w');
for ii = 1:length(fre),
anglefre = 2*pi*fre(ii);
% tline = ['Boundary Reset Return'];
% fprintf(fid0,'%s \n',tline);
for jj = 1:meshlen,%nodelen,
clear tline
tline = ['Boundary Velocity Real ' num2str(real(va(ii,jj))) ' Imag ' num2str(imag(va(ii,jj)))];
fprintf(fid0,'%s \n',tline);
tline = ['Elements ' num2str(jj)]; %'Nodes '
fprintf(fid0,'%s \n',tline);
tline = ['Return'];
fprintf(fid0,'%s \n',tline);
end
tline = ['Solve'];
fprintf(fid0,'%s \n',tline);
tline = ['Frequency ' num2str(fre(ii))];
fprintf(fid0,'%s \n',tline);
tline = ['Return'];
fprintf(fid0,'%s \n',tline);
end
tline = ['PostProcess'];
fprintf(fid0,'%s \n',tline);
tline = ['Points All'];
fprintf(fid0,'%s \n',tline);
tline = ['Frequency ' num2str(fre)];
fprintf(fid0,'%s \n',tline);
tline = ['Near 2'];
fprintf(fid0,'%s \n',tline);
tline = ['Far 5'];
fprintf(fid0,'%s \n',tline);
tline = ['Quadrature 2 2 1'];
fprintf(fid0,'%s \n',tline);
tline = ['Save Results Step 1'];
fprintf(fid0,'%s \n',tline);
tline = ['Return'];
fprintf(fid0,'%s \n',tline);
tline = ['Export Results Format Free'];
fprintf(fid0,'%s \n',tline);
tline = ['Frequency ', num2str(fre)];
fprintf(fid0,'%s \n',tline);
tline = ['File ','sysnoiseresults.txt'];
fprintf(fid0,'%s \n',tline);
tline = ['Return'];
fprintf(fid0,'%s \n',tline);
fclose(fid0) |
|