matlab代做,FPGA代做,淘宝,专业代做MATLAB、FPGA博士/硕士/本科毕业设计、项目仿真、Coursework、Assignment
QQ: 1224848052
function varargout = ctrllab_foc(varargin)
% CTRLLAB_FOC M-file for ctrllab_foc.fig
% CTRLLAB_FOC, by itself, creates a new CTRLLAB_FOC or raises the existing
% singleton*.
%
% H = CTRLLAB_FOC returns the handle to a new CTRLLAB_FOC or the handle to
% the existing singleton*.
%
% CTRLLAB_FOC('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CTRLLAB_FOC.M with the given input arguments.
%
% CTRLLAB_FOC('Property','Value',...) creates a new CTRLLAB_FOC or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ctrllab_foc_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ctrllab_foc_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ctrllab_foc_OpeningFcn, ...
'gui_OutputFcn', @ctrllab_foc_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 ctrllab_foc is made visible.
function ctrllab_foc_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 ctrllab_foc (see VARARGIN)
% Choose default command line output for ctrllab_foc
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ctrllab_foc wait for user response (see UIRESUME)
% uiwait(handles.ctrllab_foc);
ctrllab_foc_funs(6,handles,[]);
% --- Outputs from this function are returned to the command line.
function varargout = ctrllab_foc_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 menu_file_Callback(hObject, eventdata, handles)
% hObject handle to menu_file (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_model_Callback(hObject, eventdata, handles)
% hObject handle to menu_model (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_analysis_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_design_Callback(hObject, eventdata, handles)
% hObject handle to menu_design (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Help_Callback(hObject, eventdata, handles)
% hObject handle to Help (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_new_Callback(hObject, eventdata, handles)
% hObject handle to menu_new (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,1);
% --------------------------------------------------------------------
function menu_open_Callback(hObject, eventdata, handles)
% hObject handle to menu_open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,2);
% --------------------------------------------------------------------
function menu_save_Callback(hObject, eventdata, handles)
% hObject handle to menu_save (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,3);
% --------------------------------------------------------------------
function menu_saveas_Callback(hObject, eventdata, handles)
% hObject handle to menu_saveas (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,4);
% --------------------------------------------------------------------
function menu_exit_Callback(hObject, eventdata, handles)
% hObject handle to menu_exit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,5);
% --------------------------------------------------------------------
function menu_frequencyDomain_Callback(hObject, eventdata, handles)
% hObject handle to menu_frequencyDomain (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_timeDomain_Callback(hObject, eventdata, handles)
% hObject handle to menu_timeDomain (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_modelInput_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelInput (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_modelDisplay_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelDisplay (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_modelDisplay_Gc_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelDisplay_Gc (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[2,1]);
% --------------------------------------------------------------------
function menu_modelDisplay_G_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelDisplay_G (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[2,2]);
% --------------------------------------------------------------------
function menu_modelDisplay_H_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelDisplay_H (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[2,3]);
% --------------------------------------------------------------------
function menu_modelDisplay_TD_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelDisplay_TD (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[2,4]);
% --------------------------------------------------------------------
function menu_modelInput_Gc_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelInput_Gc (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[1,1]);
% --------------------------------------------------------------------
function menu_modelInput_G_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelInput_G (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[1,2]);
% --------------------------------------------------------------------
function menu_modelInput_H_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelInput_H (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[1,3]);
% --------------------------------------------------------------------
function menu_modelInput_TD_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelInput_TD (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[1,4]);
% --------------------------------------------------------------------
function menu_timeDomain_step_Callback(hObject, eventdata, handles)
% hObject handle to menu_timeDomain_step (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,1]);
% --------------------------------------------------------------------
function menu_timeDomain_impluse_Callback(hObject, eventdata, handles)
% hObject handle to menu_timeDomain_impluse (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,2]);
% --------------------------------------------------------------------
function menu_frequencyDomain_bode_Callback(hObject, eventdata, handles)
% hObject handle to menu_frequencyDomain_bode (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_frequencyDomain_nyquist_Callback(hObject, eventdata, handles)
% hObject handle to menu_frequencyDomain_nyquist (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_frequencyDomain_nichols_Callback(hObject, eventdata, handles)
% hObject handle to menu_frequencyDomain_nichols (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_importFromCtrlLAB_Callback(hObject, eventdata, handles)
% hObject handle to menu_importFromCtrlLAB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,6);
% --------------------------------------------------------------------
function menu_modelType_Callback(hObject, eventdata, handles)
% hObject handle to menu_modelType (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function menu_closeLoop_Callback(hObject, eventdata, handles)
% hObject handle to menu_closeLoop (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[3,1]);
% --------------------------------------------------------------------
function menu_openLoop_Callback(hObject, eventdata, handles)
% hObject handle to menu_openLoop (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(2,handles,[3,2]);
% --------------------------------------------------------------------
function menu_design_pid_Callback(hObject, eventdata, handles)
% hObject handle to menu_design_pid (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
pid_foc;
% --------------------------------------------------------------------
function menu_design_tid_Callback(hObject, eventdata, handles)
% hObject handle to menu_design_tid (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
tid_foc;
% --------------------------------------------------------------------
function menu_analysis_nichols_sm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nichols_sm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,3,1]);
% --------------------------------------------------------------------
function menu_analysis_nichols_cm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nichols_cm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,3,2]);
% --------------------------------------------------------------------
function menu_analysis_nichols_pm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nichols_pm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,3 3]);
% --------------------------------------------------------------------
function menu_analysis_nichols_fm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nichols_fm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,3 4]);
% --------------------------------------------------------------------
function menu_analysis_nyquist_sm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nyquist_sm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,2,1]);
% --------------------------------------------------------------------
function menu_analysis_nyquist_cm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nyquist_cm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,2,2]);
% --------------------------------------------------------------------
function menu_analysis_nyquist_pm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nyquist_pm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,2,3]);
% --------------------------------------------------------------------
function menu_analysis_nyquist_fm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_nyquist_fm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,2,4]);
% --------------------------------------------------------------------
function menu_analysis_bode_sm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_bode_sm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,1,1]);
% --------------------------------------------------------------------
function menu_analysis_bode_cm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_bode_cm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,1,2]);
% --------------------------------------------------------------------
function menu_analysis_bode_pm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_bode_pm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,1,3]);
% --------------------------------------------------------------------
function menu_analysis_bode_fm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_bode_fm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,1,4]);
% --------------------------------------------------------------------
function menu_analysis_impulse_sm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_impulse_sm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,2,1]);
% --------------------------------------------------------------------
function menu_analysis_impulse_cm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_impulse_cm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,2,2]);
% --------------------------------------------------------------------
function menu_analysis_impulse_pm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_impulse_pm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,2,3]);
% --------------------------------------------------------------------
function menu_analysis_impulse_fm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_impulse_fm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,2,4]);
% --------------------------------------------------------------------
function menu_analysis_step_sm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_step_sm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,1,1]);
% --------------------------------------------------------------------
function menu_analysis_step_cm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_step_cm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,1,2]);
% --------------------------------------------------------------------
function menu_analysis_step_pm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_step_pm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,1,3]);
% --------------------------------------------------------------------
function menu_analysis_step_fm_Callback(hObject, eventdata, handles)
% hObject handle to menu_analysis_step_fm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,1,4]);
% --------------------------------------------------------------------
function menu_model_oustafod_Callback(hObject, eventdata, handles)
% hObject handle to menu_model_oustafod (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
prompt={'N:','Range of Frequency:'};
title='Input';
default={'4','[1e-3,1e4]'};
answ=inputdlg(prompt,title,1,default);
N=str2double(answ{1});
w=str2num(answ{2});
setappdata(handles.ctrllab_foc,'ousta_arg',[N w]);
% --------------------------------------------------------------------
function uipushtool_new_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_new (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,1);
% --------------------------------------------------------------------
function uipushtool_open_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,2);
% --------------------------------------------------------------------
function uipushtool_save_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_save (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(1,handles,3);
% --------------------------------------------------------------------
function uipushtool_bode_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_bode (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,1,1]);
% --------------------------------------------------------------------
function uipushtool_nyquist_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_nyquist (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,2,1]);
% --------------------------------------------------------------------
function uipushtool_nichols_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_nichols (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[1,3,1]);
% --------------------------------------------------------------------
function uipushtool_step_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_step (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,1,1]);
% --------------------------------------------------------------------
function uipushtool_impulse_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_impulse (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
ctrllab_foc_funs(3,handles,[2,2,1]);
% --------------------------------------------------------------------
function uipushtool_pid_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_pid (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
pid_foc;
% --------------------------------------------------------------------
function uipushtool_tid_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_tid (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
tid_foc;
% --------------------------------------------------------------------
function uipushtool_help_ClickedCallback(hObject, eventdata, handles)
% hObject handle to uipushtool_help (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
uiwait(msgbox('Help Files is not found.','Help'));