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

📄 simuresultmulti.m

📁 matlab互交式进行数据统计分析的工具包。利用gui界面给方便进行基本的数据统计分析
💻 M
📖 第 1 页 / 共 3 页
字号:
function varargout = SimuResultMulti(varargin)
% SIMURESULTMULTI M-file for SimuResultMulti.fig
%      SIMURESULTMULTI, by itself, creates a new SIMURESULTMULTI or raises the existing
%      singleton*.
%
%      H = SIMURESULTMULTI returns the handle to a new SIMURESULTMULTI or the handle to
%      the existing singleton*.
%
%      SIMURESULTMULTI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in SIMURESULTMULTI.M with the given input arguments.
%
%      SIMURESULTMULTI('Property','Value',...) creates a new SIMURESULTMULTI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before SimuResultMulti_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to SimuResultMulti_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 SimuResultMulti

% Last Modified by GUIDE v2.5 30-Nov-2005 09:25:04

% Begin initialization code - DO NOT EDITN
gui_Singleton = 0;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @SimuResultMulti_OpeningFcn, ...
                   'gui_OutputFcn',  @SimuResultMulti_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 EDITN


% --- Executes just before SimuResultMulti is made visible.
function SimuResultMulti_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 SimuResultMulti (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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

% Mainfighandle=get(hObject,'Userdata')
% Mainhandles=guihandles(Mainfighandle)
Temp_simu=evalin('base','Temp_simu');
Temp_act=evalin('base','Temp_act');
Temp_pre=evalin('base','Temp_pre');

Sresult.Temp_simu=Temp_simu;
Sresult.Temp_act=Temp_act;
Sresult.Temp_pre=Temp_pre;

Sresult.N=length(Temp_simu);
Sresult.minSimu=min(Temp_simu(:,1));
Sresult.maxSimu=max(Temp_simu(:,1));
Sresult.meanSimu=mean(Temp_simu(:,1));
Sresult.stdSimu=std(Temp_simu(:,1));

Sresult.minAct=min(Temp_act(:,1));
Sresult.maxAct=max(Temp_act(:,1));
Sresult.meanAct=mean(Temp_act(:,1));
Sresult.stdAct=std(Temp_act(:,1));

Sresult.maxAbsError=max(abs(Temp_act(:,1)-Temp_simu(:,1)));
Sresult.maxRelError=100*max(abs(Temp_act(:,1)-Temp_simu(:,1))./Temp_act(:,1));
Sresult.mse=sqrt(mse(Temp_act(:,1)-Temp_simu(:,1)));
%     Sresult.mse=sqrt((Temp_act(:,1)-Temp_simu(:,1))'*(Temp_act(:,1)-Temp_simu(:,1))/Sresult.N);
Sresult.mae=mae(Temp_act(:,1)-Temp_simu(:,1));

assignin('base','Sresult',Sresult);

load SubBtnCData
set(handles.btnCancel,'CData',X_cancel);


set(handles.editN,'String',num2str(Sresult.N));

set(handles.editMinSimu,'String',num2str(Sresult.minSimu));
set(handles.editMaxSimu,'String',num2str(Sresult.maxSimu));
set(handles.editMeanSimu,'String',num2str(Sresult.meanSimu));
set(handles.editStdSimu,'String',num2str(Sresult.stdSimu));

set(handles.editMinAct,'String',num2str(Sresult.minAct));
set(handles.editMaxAct,'String',num2str(Sresult.maxAct));
set(handles.editMeanAct,'String',num2str(Sresult.meanAct));
set(handles.editStdAct,'String',num2str(Sresult.stdAct));

set(handles.editMaxAbsError,'String',num2str(Sresult.maxAbsError));
set(handles.editMaxRelError,'String',num2str(Sresult.maxRelError));
set(handles.editMSE,'String',num2str(Sresult.mse));
set(handles.editMAE,'String',num2str(Sresult.mae));



% --- Outputs from this function are returned to the command line.
function varargout = SimuResultMulti_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 editN_Callback(hObject, eventdata, handles)
% hObject    handle to editN (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 editN as text
%        str2double(get(hObject,'String')) returns contents of editN as a double


% --- Executes during object creation, after setting all properties.
function editN_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editN (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editAbserror_Callback(hObject, eventdata, handles)
% hObject    handle to editAbserror (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 editAbserror as text
%        str2double(get(hObject,'String')) returns contents of editAbserror as a double


% --- Executes during object creation, after setting all properties.
function editAbserror_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editAbserror (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editAbsError_Callback(hObject, eventdata, handles)
% hObject    handle to editAbsError (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 editAbsError as text
%        str2double(get(hObject,'String')) returns contents of editAbsError as a double


% --- Executes during object creation, after setting all properties.
function editAbsError_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editAbsError (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editMeanStdError_Callback(hObject, eventdata, handles)
% hObject    handle to editMeanStdError (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 editMeanStdError as text
%        str2double(get(hObject,'String')) returns contents of editMeanStdError as a double


% --- Executes during object creation, after setting all properties.
function editMeanStdError_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editMeanStdError (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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
%        str2double(get(hObject,'String')) returns contents of edit5 as a double


% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editMaxSimu_Callback(hObject, eventdata, handles)
% hObject    handle to editMaxSimu (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 editMaxSimu as text
%        str2double(get(hObject,'String')) returns contents of editMaxSimu as a double


% --- Executes during object creation, after setting all properties.
function editMaxSimu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editMaxSimu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editMeanSimu_Callback(hObject, eventdata, handles)
% hObject    handle to editMeanSimu (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 editMeanSimu as text
%        str2double(get(hObject,'String')) returns contents of editMeanSimu as a double


% --- Executes during object creation, after setting all properties.
function editMeanSimu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editMeanSimu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editStdSimu_Callback(hObject, eventdata, handles)
% hObject    handle to editStdSimu (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 editStdSimu as text
%        str2double(get(hObject,'String')) returns contents of editStdSimu as a double


% --- Executes during object creation, after setting all properties.
function editStdSimu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editStdSimu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: editN 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 editMinAct_Callback(hObject, eventdata, handles)
% hObject    handle to editMinAct (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 editMinAct as text

⌨️ 快捷键说明

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