⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 writesonproject.m

📁 利用matlab控制3维仿真软件sonnet的工具箱
💻 M
字号:
function [successful,filename]=WriteSonProject(OutputText,RunNumber)

% This function writes the Sonnet Project text to a file.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Author: Serhend Arvas, sarvas@syr.edu    %
% Part of Patch Antenna Design Code        %
% August 2007                              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CurrentDir=cd; % Finds the Current Directory

% Constructs the FileName
filename=[CurrentDir '\SonnetProjectFiles\PatchAnt' num2str(RunNumber) '.son']; 
fid=fopen(filename,'w'); % Opens the file

% Sets a flag based on the success or failure of the open operation
if fid == -1
    successful = 0;
else
    successful = 1;
end

% writes the lines of the project file followed by newline characters.
for lineNum=1:length(OutputText)   
    line=OutputText{lineNum};
    fprintf(fid,line); 
    fprintf(fid,'\n');  
end

fclose(fid);  % Closes the file.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -