📄 fm_new.m
字号:
function fm_new% FM_NEW open and initialize variables and global structures for UDM%% FM_NEW%%Author: Federico Milano%Date: 11-Nov-2002%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 Comp Algeb Buses Initl Param Servc State Path FigBuses.n = 0;State.n = 0;Algeb.n = 0;Servc.n = 0;Param.n = 0;Initl.n = 0;State.neq = 0;Algeb.neq = 0;Servc.neq = 0;Comp.name = '';Comp.descr = '';Comp.init = 0;Comp.shunt = 1;Servc.name = [];Buses.name = [];State.name = [];Param.name = [];Algeb.name = [];Initl.name = [];State.eq = [];Algeb.eq = [];Servc.eq = [];State.eqidx = [];Algeb.eqidx = [];Servc.eqidx = [];Initl.idx = [];State.limit = [];State.time = [];State.nodyn = [];Servc.limit = [];Servc.type = [];State.un = [];State.fn = [];Param.type = [];Param.unit = [];Param.descr = [];Initl.idx = [];Algeb.idx = [];Servc.idx = [];State.init = [];State.offset = [];Servc.init = [];Servc.offset = [];Servc.un = [];Servc.fn = [];fm_make% GUI handleshdl = get(Fig.make,'UserData');% component propertiesset(hdl(1),'String',Comp.name)set(hdl(2),'String','')set(hdl(3),'String','')% variable listboxesset(hdl(4),'String',Buses.name,'Value',1)set(hdl(5),'String',State.name,'Value',1)set(hdl(6),'String',Algeb.name,'Value',1)set(hdl(8),'String',Param.name,'Value',1)set(hdl(7),'String',Servc.name,'Value',1)set(hdl(9),'String',Initl.name,'Value',1)% equation listboxesset(hdl(10),'String',State.eq,'Value',1)set(hdl(11),'String',Algeb.eq,'Value',1)set(hdl(12),'String',Servc.eq,'Value',1)% popupmenu variablesset(hdl(13),'String',' ','Value',1)try Servc.oldidx = textread([Path.psat,'service.ini'],'%s','delimiter','\n','whitespace',''); Servc.idx = Servc.oldidx; set(hdl(14),'String',Servc.idx,'Value',1)endset(hdl(15),'String',' ','Value',1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -