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

📄 rbf_faultj.asv

📁 线性神经网络
💻 ASV
字号:
function varargout = RBF_FaultJ(varargin)
% RBF_FAULTJ M-file for RBF_FaultJ.fig
%      RBF_FAULTJ, by itself, creates a new RBF_FAULTJ or raises the existing
%      singleton*.
%
%      H = RBF_FAULTJ returns the handle to a new RBF_FAULTJ or the handle to
%      the existing singleton*.
%
%      RBF_FAULTJ('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in RBF_FAULTJ.M with the given input arguments.
%
%      RBF_FAULTJ('Property','Value',...) creates a new RBF_FAULTJ or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before RBF_FaultJ_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to RBF_FaultJ_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

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help RBF_FaultJ

% Last Modified by GUIDE v2.5 04-Jun-2006 22:59:24

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @RBF_FaultJ_OpeningFcn, ...
                   'gui_OutputFcn',  @RBF_FaultJ_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 RBF_FaultJ is made visible.
function RBF_FaultJ_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 RBF_FaultJ (see VARARGIN)

% Choose default command line output for RBF_FaultJ
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes RBF_FaultJ wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = RBF_FaultJ_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 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


% --- 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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit3_Callback(hObject, eventdata, handles)
% hObject    handle to edit3 (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 edit3 as text
%        str2double(get(hObject,'String')) returns contents of edit3 as a double


% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit3 (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit4_Callback(hObject, eventdata, handles)
% hObject    handle to edit4 (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 edit4 as text
%        str2double(get(hObject,'String')) returns contents of edit4 as a double


% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit4 (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes on button press in pb_DataTrain_In.
function pb_DataTrain_In_Callback(hObject, eventdata, handles)
% hObject    handle to pb_DataTrain_In (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
user_data=get(gcf,'userdata');
[name,path]=uigetfile('*.mat','Load data set');
pathname=strcat(path,name); 
file.name=name;  file.path=path;  file.pathname=pathname;
LoadData=load('-mat',file.pathname);
T_Data=LoadData.RBFinputData;
T_Data=T_Data';
set(findobj('Tag','edit_DataIn_Show'),'String',num2str(T_Data));
user_data.I_Data=T_Data;
%subplot('position',[606 22.692 50.2 19.308]);
plot(findobj('Tag','axes_DataIn'),T_Data(1,:),(T_Data(2,:)+T_Data(3,:))/2,'r+');
set(gcf,'userdata',user_data);


% --- Executes on button press in pb_DataTar_In.
function pb_DataTar_In_Callback(hObject, eventdata, handles)
% hObject    handle to pb_DataTar_In (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
user_data=get(gcf,'userdata');
[name,path]=uigetfile('*.mat','Load data set');
pathname=strcat(path,name); 
file.name=name;  file.path=path;  file.pathname=pathname;
LoadData=load('-mat',file.pathname);
T_Data=LoadData.RBFtargetData;
T_Data=T_Data';
user_data.T_Data=T_Data;
%subplot('position',[0.041 0.338 0.443 0.624]);
plot(findobj('Tag','axes_DataTar'),T_Data(1,:),(T_Data(2,:)+T_Data(3,:))/2,'r+');
set(findobj('Tag','edit_DataTar_Show'),'String',num2str(user_data.T_Data));
set(gcf,'userdata',user_data);


% --- Executes on button press in pb_DataTest_In.
function pb_DataTest_In_Callback(hObject, eventdata, handles)
% hObject    handle to pb_DataTest_In (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
user_data=get(gcf,'userdata');
[name,path]=uigetfile('*.mat','Load data set');
pathname=strcat(path,name); 
file.name=name;  file.path=path;  file.pathname=pathname;
LoadData=load('-mat',file.pathname);
name=strtok(name,'.');
name=strcat('LoadData.',name);
str=strcat('T_Data=',name);
eval(str);
T_Data=T_Data';
user_data.Tt_Data=T_Data;
%subplot('position',[0.041 0.338 0.443 0.624]);
plot(findobj('Tag','axes_DataTest'),T_Data(1,:),(T_Data(2,:)+T_Data(3,:))/2,'r+');
set(findobj('Tag','edit4'),'String',num2str(user_data.Tt_Data));
set(gcf,'userdata',user_data);


% --- Executes on button press in pb_SAT.
function pb_SAT_Callback(hObject, eventdata, handles)
% hObject    handle to pb_SAT (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
user_data=get(gcf,'UserData');
P=user_data.I_Data;
T=user_data.T_Data;
V=user_data.Tt_Data;
net=newrbe(P,T,1.2);
Y=sim(net,V);
assignin('base','test');
h=figure;
RBFresult(Y);




function edit_DataTar_Show_Callback(hObject, eventdata, handles)
% hObject    handle to edit_DataTar_Show (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 edit_DataTar_Show as text
%        str2double(get(hObject,'String')) returns contents of edit_DataTar_Show as a double


⌨️ 快捷键说明

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