function varargout = jiemian(varargin)
% JIEMIAN M-file for jiemian.fig
% JIEMIAN, by itself, creates a new JIEMIAN or raises the existing
% singleton*.
%
% H = JIEMIAN returns the handle to a new JIEMIAN or the handle to
% the existing singleton*.
%
% JIEMIAN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in JIEMIAN.M with the given input arguments.
%
% JIEMIAN('Property','Value',...) creates a new JIEMIAN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before jiemian_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to jiemian_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help jiemian
% Last Modified by GUIDE v2.5 24-May-2012 14:55:59
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @jiemian_OpeningFcn, ...
'gui_OutputFcn', @jiemian_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before jiemian is made visible.
function jiemian_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to jiemian (see VARARGIN)
% Choose default command line output for jiemian
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes jiemian wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = jiemian_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
input=str2num(get(hObject,'String'));
if(isempty(input))
set(hObject,'String','case11')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
global epilson
input=str2double(get(hObject,'String'));
epilson=input
if(isempty(input))
set(hObject,'String','0.00001')
end
guidata(hObject,handles);
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in radiobutton1.
function radiobutton1_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of radiobutton1
% --- Executes on button press in radiobutton2.
function radiobutton2_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of radiobutton2
% --- Executes during object creation, after setting all properties.
function N_P_CreateFcn(hObject, eventdata, handles)
% hObject handle to N_P (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes when selected object is changed in N_P.
function N_P_SelectionChangeFcn(hObject, eventdata, handles)
% hObject handle to the selected object in N_P
% eventdata structure with the following fields (see UIBUTTONGROUP)
% EventName: string 'SelectionChanged' (read only)
% OldValue: handle of the previously selected object or empty if none was selected
% NewValue: handle of the currently selected object
% handles structure with handles and user data (see GUIDATA)
global method
switch get(hObject,'Tag')
case 'N'
method=1;
case 'P'
method=2;
end;
guidata(hObject,handles);
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% casename=get(handles.edit1,'String')
% epilson=get(handles.edit2,'String')
% handles.listbox1.casename=casename;
%handles.listbox1.epilson=epilson;
%guidata(hObject,handles);
% --- Executes on selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)
% hObject handle to listbox1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from listbox1
global method
global epilson
casename=get(handles.edit1,'String');
if(method==1)
[Node,Branchflow,DCdata]=runNR(epilson,casename);
if(get(hObject,'Value')==1)
N=Node(:,7:8);
cnames= { 'V','theta'};
t=uitable('DATA',N,'ColumnName',cnames,'Position',[27,40,450,250]);
elseif(get(hObject,'Value')==2)
B=Branchflow( :,1:4);
cnames={'P->','Q->','P<-','Q<-'};
t=uitable('DATA',B,'ColumnName',cnames,'Position',[27,40,450,250]);
elseif(get(hObject,'Value')==3)
cnames={'电压比','控制角','直流电压','有功功率','无功功率'};
t=uitable('DATA',DCdata,'ColumnName',cnames,'Position'
power-flowACDC.rar_ac dc power flow_power flow ac dc_交替迭代_交直流 11
版权申诉
5星 · 超过95%的资源 149 浏览量
2022-07-15
10:24:11
上传
评论 1
收藏 30KB RAR 举报
alvarocfc
- 粉丝: 109
- 资源: 1万+
最新资源
- 5.23-Java概述,JDK安装及注释、关键字、标识符、数据类型、变量、常量的介绍
- 《Python基础》实验三指导书(1).doc
- TensorFlow 深度学习、机器学习-任何能够用计算流图形来表达的计算,都可以使用TensorFlow
- 一个基于springboot+sureness的面向REST API资源无状态认证权限管理系统
- 王博外文文献.pdf
- python毕业设计基于社区检测的多任务聚类联邦学习项目源码+使用说明(高分项目).zip
- Javaweb项目源码-编程爱好者博客地带.zip
- java各个技术栈相关知识点
- PYthon代码 pdf合并
- 内容涵盖:Java、MyBatis、ZooKeeper、Dubbo、Elasticsearch、Memcached、 Redis
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论5