function varargout = graynet_gui(varargin)
% GRAYNET_GUI MATLAB code for graynet_gui.fig
% GRAYNET_GUI, by itself, creates a new GRAYNET_GUI or raises the existing
% singleton*.
%
% H = GRAYNET_GUI returns the handle to a new GRAYNET_GUI or the handle to
% the existing singleton*.
%
% GRAYNET_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GRAYNET_GUI.M with the given input arguments.
%
% GRAYNET_GUI('Property','Value',...) creates a new GRAYNET_GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before graynet_gui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to graynet_gui_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 graynet_gui
% Last Modified by GUIDE v2.5 05-Sep-2014 17:31:57
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @graynet_gui_OpeningFcn, ...
'gui_OutputFcn', @graynet_gui_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 graynet_gui is made visible.
function graynet_gui_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 graynet_gui (see VARARGIN)
% Choose default command line output for graynet_gui
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes graynet_gui wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = graynet_gui_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;
% --- Executes on button press in pushbutton1.
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)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in run.
function run_Callback(hObject, eventdata, handles)
% hObject handle to run (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.edit13,'string','训练集百分误差平均');
if isnan(str2double(get(handles.edit11,'string')))
train_ratio=0.9;
else
train_ratio=str2double(get(handles.edit11,'string'));
end
X=handles.X;
if get(handles.radiobutton1,'Value')==1
Y=handles.Y{1};
else
Y=[];
end
if isnan(str2double(get(handles.edit5,'string')))||...
isnan(str2double(get(handles.edit6,'string')))||...
isnan(str2double(get(handles.edit7,'string')))||...
isnan(str2double(get(handles.edit8,'string')))||...
isnan(str2double(get(handles.edit9,'string')))||...
isnan(str2double(get(handles.edit10,'string')))
[results,mean_error_p]=Graynet(X,Y,train_ratio,handles);
% 运行主程序
else
options.ar_gen=str2double(get(handles.edit5,'string'));
options.num_pop=str2double(get(handles.edit6,'string'));
options.p_c_max=str2double(get(handles.edit8,'string'));
options.p_c_min=str2double(get(handles.edit7,'string'));
options.p_m_min=str2double(get(handles.edit9,'string'));
options.p_m_max=str2double(get(handles.edit10,'string'));
[results,mean_error_p]=Graynet(X,Y,train_ratio,handles,options);
end
set(handles.edit13,'string',[num2str(mean_error_p*100),'%']);
handles.results=results;
handles.mean_error_p=mean_error_p;
guidata(hObject,handles);
% --- Executes on button press in save.
function save_Callback(hObject, eventdata, handles)
% hObject handle to save (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[~,p]=uiputfile({'*.*'},'数据保存路径选择');
% pix=getframe(handles.axes3);
% imwrite(pix.cdata,[p,f],'bmp')
% set(gcf,'CurrentAxes',handles.axes3);
% ff=getimage(gcf);
% imwrite(ff,[p,f])
results=handles.results;
mean_error_p=handles.mean_error_p;
save([p,'results.mat'],'results');
save([p,'mean_error_p.mat'],'mean_error_p');
% --- Executes on button press in coe_exp.
function coe_exp_Callback(hObject, eventdata, handles)
% hObject handle to coe_exp (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
attention;
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (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 edit7 as text
% str2double(get(hObject,'String')) returns contents of edit7 as a double
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (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 edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (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 edit6 as text
% str2double(get(hObject,'String')) returns contents of edit6 as a double
% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (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 edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (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 edit5 as text
% s
灰色神经网络预测问题GUI
2星 需积分: 9 164 浏览量
2014-10-30
08:54:40
上传
评论 1
收藏 27KB ZIP 举报
Santis_Ydd
- 粉丝: 0
- 资源: 1
最新资源
- zigbee多端.zip
- 电子通信设计资料AVR常用单片机芯片中文资料
- 毕业设计基于深度学习的水果识别系统源码+文档说明+数据集+模型(高分项目).zip
- python毕设基于深度学习的水果识别系统源码+文档说明+数据集+模型(高分项目).zip
- 基于STM32F302C8T6单片机+CH340E AD设计(原理图库+PCB封装库)文件.zip
- IAR EW8051 V8.1
- 基于TensorFlow+ResNet残差神经网络实现白细胞图片分类Python源码.zip
- 基于STM32F107单片机+IR0038+CH340G+MOC3063智能家居主板硬件(原理图+PCB+封装库)工程文件
- 适用于 PHP 的 MQTT 协议解析和协程客户端mqtt-master.zip
- 银行家算法和作业调度算法.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈