📄 fm_pti.m
字号:
function check = fm_pti(filename,pathname,flag)% FM_PTI convert PTI power flow data format% into PSAT data format%%CHECK = FM_PTI(FILENAME,PATHNAME,FLAG)% FILENAME name of the file to be converted% PATHNAME path of the file to be converted% FLAG = 1 append original file as a comment% FLAG = 0 do not append original file%% CHECK = 1 conversion completed% CHECK = 0 problem encountered (no data file created)%%Author: Federico Milano%Date: 09-Jun-2003%Version: 1.0.0%%E-mail: fmilano@thunderbox.uwaterloo.ca%Web-site: http://thunderbox.uwaterloo.ca/~fmilano%% Copyright (C) 2002-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.global Settingscheck = 1;if ~strcmp(pathname(end),filesep) pathname = [pathname,filesep];endfm_dispfm_disp('Conversion from PTI Power Flow Data Format...');fm_disp(['Source data file "',pathname,filename,'"'])fid = fopen([pathname,filename]);if fid == -1, fm_disp(['Can''t open file ',pathname,filename],2), check = 0; return,endhrow = fgetl(fid);[ic,sbase] = strread(hrow,'%d%f','delimiter',' ');if ic ~= 0, fm_disp('First row is in a wrong format. Conversion Process Interrupted',2); check = 0; returnendheading = deblank(fgetl(fid));heading = [heading,' - ',fgetl(fid)];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -