matlab毕业编程谷速软件卷积的GUI.docx
- 文档编号:10428381
- 上传时间:2023-02-11
- 格式:DOCX
- 页数:28
- 大小:20.22KB
matlab毕业编程谷速软件卷积的GUI.docx
《matlab毕业编程谷速软件卷积的GUI.docx》由会员分享,可在线阅读,更多相关《matlab毕业编程谷速软件卷积的GUI.docx(28页珍藏版)》请在冰豆网上搜索。
matlab毕业编程谷速软件卷积的GUI
functionvarargout=ConvolveAnimParam(varargin)
%CONVOLVEANIMPARAMM-fileforConvolveAnimParam.fig
%CONVOLVEANIMPARAM,byitself,createsanewCONVOLVEANIMPARAMorraisestheexisting
%singleton*.
%
%H=CONVOLVEANIMPARAMreturnsthehandletoanewCONVOLVEANIMPARAMorthehandleto
%theexistingsingleton*.
%
%CONVOLVEANIMPARAM('CALLBACK',hObject,eventData,handles,...)callsthelocal
%functionnamedCALLBACKinCONVOLVEANIMPARAM.Mwiththegiveninputarguments.
%
%CONVOLVEANIMPARAM('Property','Value',...)createsanewCONVOLVEANIMPARAMorraisesthe
%existingsingleton*.Startingfromtheleft,propertyvaluepairsare
%appliedtotheGUIbeforeConvolveAnimParam_OpeningFunctiongetscalled.An
%unrecognizedpropertynameorinvalidvaluemakespropertyapplication
%stop.AllinputsarepassedtoConvolveAnimParam_OpeningFcnviavarargin.
%
%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone
%instancetorun(singleton)".
%
%Seealso:
GUIDE,GUIDATA,GUIHANDLES
%EdittheabovetexttomodifytheresponsetohelpConvolveAnimParam
%LastModifiedbyGUIDEv2.523-Dec-200314:
18:
51
%Begininitializationcode-DONOTEDIT
gui_Singleton=1;
gui_State=struct('gui_Name',mfilename,...
'gui_Singleton',gui_Singleton,...
'gui_OpeningFcn',@ConvolveAnimParam_OpeningFcn,...
'gui_OutputFcn',@ConvolveAnimParam_OutputFcn,...
'gui_LayoutFcn',[],...
'gui_Callback',[]);
ifnargin&isstr(varargin{1})
gui_State.gui_Callback=str2func(varargin{1});
end
ifnargout
[varargout{1:
nargout}]=gui_mainfcn(gui_State,varargin{:
});
else
gui_mainfcn(gui_State,varargin{:
});
end
%Endinitializationcode-DONOTEDIT
%---ExecutesjustbeforeConvolveAnimParamismadevisible.
functionConvolveAnimParam_OpeningFcn(hObject,eventdata,handles,varargin)
%Thisfunctionhasnooutputargs,seeOutputFcn.
%hObjecthandletofigure
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%varargincommandlineargumentstoConvolveAnimParam(seeVARARGIN)
%ChoosedefaultcommandlineoutputforConvolveAnimParam
handles.output=hObject;
if(length(varargin)~=7),
beep;
disp('WrongnumberofinputargumentstoConvolveAnimParam');
uiresume
else
set(handles.textFileName,'String',varargin{1});
handles.filePath=varargin{2};
set(handles.editNumFrames,'String',num2str(varargin{3}));
set(handles.checkSaveFile,'Value',varargin{4});
movieType=varargin{5};
switch(movieType),
case{1}
set(handles.radioMatLabMovie,'Value',1);
set(handles.radioAviComp,'Value',0);
set(handles.radioAviNotComp,'Value',0);
case{2}
set(handles.radioMatLabMovie,'Value',0);
set(handles.radioAviComp,'Value',1);
set(handles.radioAviNotComp,'Value',0);
case{3}
set(handles.radioMatLabMovie,'Value',0);
set(handles.radioAviComp,'Value',0);
set(handles.radioAviNotComp,'Value',1);
otherwise
set(handles.radioMatLabMovie,'Value',1);
set(handles.radioAviComp,'Value',0);
set(handles.radioAviNotComp,'Value',0);
end
set(handles.checkShowLegend,'Value',varargin{6});
set(handles.editFPS,'String',num2str(varargin{7}));
end
%Updatehandlesstructure
guidata(hObject,handles);
%UIWAITmakesConvolveAnimParamwaitforuserresponse(seeUIRESUME)
uiwait(handles.ConvolveAnimParamDlg);
%---Outputsfromthisfunctionarereturnedtothecommandline.
functionvarargout=ConvolveAnimParam_OutputFcn(hObject,eventdata,handles)
%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);
%hObjecthandletofigure
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
myFName=get(handles.textFileName,'String');
varargout{2}=handles.filePath;
varargout{3}=str2num(get(handles.editNumFrames,'String'));
varargout{4}=get(handles.checkSaveFile,'Value');
if(get(handles.radioMatLabMovie,'Value')==1),
movieType=1;
elseif(get(handles.radioAviComp,'Value')==1),
movieType=2;
elseif(get(handles.radioAviNotComp,'Value')==1),
movieType=3;
else
beep;
disp('Warning1,unknownfiletype,ConvolveAnimParam_OutputFcn');
movieType=1;
end
varargout{5}=movieType;
varargout{6}=get(handles.checkShowLegend,'Value');
varargout{7}=str2num(get(handles.editFPS,'String'));
[pathstrnameextversn]=fileparts(myFName);
if(strcmp(ext,'')),
switchmovieType,
case{1}
myFName=[myFName'.mat'];
case{2,3}
myFName=[myFName'.avi'];
otherwise
beep;
disp('Warning2,unknownfiletype,ConvolveAnimParam_OutputFcn');
movieType=1;
end
end
varargout{1}=myFName;
delete(handles.ConvolveAnimParamDlg);
%---ExecutesonbuttonpressinpushDone.
functionpushDone_Callback(hObject,eventdata,handles)
%hObjecthandletopushDone(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
uiresume;
%---Executesduringobjectcreation,aftersettingallproperties.
functioneditNumFrames_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoeditNumFrames(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:
editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
functioneditNumFrames_Callback(hObject,eventdata,handles)
%hObjecthandletoeditNumFrames(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%---Executesduringobjectcreation,aftersettingallproperties.
functioneditFPS_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoeditFPS(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:
editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
functioneditFPS_Callback(hObject,eventdata,handles)
%hObjecthandletoeditFPS(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%---ExecutesonbuttonpressincheckShowLegend.
functioncheckShowLegend_Callback(hObject,eventdata,handles)
%hObjecthandletocheckShowLegend(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%---ExecutesonbuttonpressincheckSaveFile.
functioncheckSaveFile_Callback(hObject,eventdata,handles)
%hObjecthandletocheckSaveFile(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%---ExecutesonbuttonpressinradioMatLabMovie.
functionradioMatLabMovie_Callback(hObject,eventdata,handles)
%hObjecthandletoradioMatLabMovie(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
set(handles.radioMatLabMovie,'Value',1);
set(handles.radioAviComp,'Value',0);
set(handles.radioAviNotComp,'Value',0);
%---ExecutesonbuttonpressinradioAviComp.
functionradioAviComp_Callback(hObject,eventdata,handles)
%hObjecthandletoradioAviComp(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
set(handles.radioAviComp,'Value',1);
set(handles.radioMatLabMovie,'Value',0);
set(handles.radioAviNotComp,'Value',0);
%---ExecutesonbuttonpressinradioAviNotComp.
functionradioAviNotComp_Callback(hObject,eventdata,handles)
%hObjecthandletoradioAviNotComp(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
set(handles.radioAviNotComp,'Value',1);
set(handles.radioMatLabMovie,'Value',0);
set(handles.radioAviComp,'Value',0);
%---ExecutesonbuttonpressinpushFileName.
functionpushFileName_Callback(hObject,eventdata,handles)
%hObjecthandletopushFileName(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
if(get(handles.radioMatLabMovie,'Value')==1),
[fileNamepathName]=uiputfile('*.mat','SaveMatlabMovieas.matfile');
elseif((get(handles.radioAviComp,'Value')==1)|...
(get(handles.radioAviNotComp,'Value')==1)),
[fileNamepathName]=uiputfile('*.avi','SaveMatlabMovieas.avifile');
else
errordlg('Unknownfiletype,ConvolveAnimParam,pushFileName_Callback');
end
if(fileName~=0),
set(handles.textFileName,'String',fileName);
handles.filePath=pathName;
end
guidata(handles.ConvolveAnimParamDlg,handles);
functionConvolveFuncs
s='U(t)';
d='UnitStep';
cFuncStep={sd};
s='U(t)-U(t-2)';
d='Pulse(2sec)';
cFuncPulse2={sd};
s='2*(U(t)-U(t-1))';
d='Pulse(amp=2,1sec)';
cFuncPulseDouble={sd};
s='0.5*(U(t)-U(t-2))';
d='Pulse(amp=0.5,2sec)';
cFuncPulseHalf={sd};
s='t.*(U(t)-U(t-1))';
d='Ramp(1sec)';
cFuncRamp1={sd};
s='(1-t).*U(t)+(t-1).*U(t-1)';
d='InverseRamp(1sec)';
cFuncRamp2={sd};
s='t.*U(t)-(2*t-2).*U(t-1)+(t-2).*U(t-2)';
d='Triangle(2sec)';
cFuncTriangle={sd};
s='U(t)-2*U(t-1)+U(t-2)';
d='BiPhasic(2sec)';
cFuncBiphasic={sd};
s='U(t).*exp(-0.5.*t).*sin(sqrt(3/4)*t)/sqrt(3/4)';
d='DampedSinusoid';
cFuncDampedSine={sd};
s='U(t).*(sin(t).*t+1).*U(4-t)';
d='Oddballfunction';
cFuncOddBal
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- matlab 毕业 编程 软件 卷积 GUI