资源描述:
《三次样条曲线插补模拟》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、三次样条曲线插补模拟主程序M文件(King.m):functionvarargout=King(varargin)%KINGMATLABcodeforKing.fig%KING,byitself,createsanewKINGorraisestheexisting%singleton*.%%H=KINGreturnsthehandletoanewKINGorthehandleto%theexistingsingleton*.%%KING('CALLBACK',hObject,eventData,handles,...
2、)callsthelocal%functionnamedCALLBACKinKING.Mwiththegiveninputarguments.%%KING('Property','Value',...)createsanewKINGorraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforeKing_OpeningFcngetscalled.An%unrecognizedpr
3、opertynameorinvalidvaluemakespropertyapplication%stop.AllinputsarepassedtoKing_OpeningFcnviavarargin.%%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone%instancetorun(singleton)".%%Seealso:GUIDE,GUIDATA,GUIHANDLES%EdittheabovetexttomodifytheresponsetohelpKin
4、g%LastModifiedbyGUIDEv2.506-May-201321:39:33%Begininitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_OpeningFcn',@King_OpeningFcn,...'gui_OutputFcn',@King_OutputFcn,
5、...'gui_LayoutFcn',[],...'gui_Callback',[]);ifnargin&&ischar(varargin{1})gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,varargin{:});end%Endinitializat
6、ioncode-DONOTEDITfunctionstr=format_time(t)%时间格式调整函数hrs=floor(t/3600);min=floor(t/60-60*hrs);sec=t-60*(min+60*hrs);ifhrs<10h=sprintf('0%1.0f:',hrs);elseh=sprintf('%1.0f:',hrs);endifmin<10m=sprintf('0%1.0f:',min);elsem=sprintf('%1.0f:
7、39;,min);endifsec<9.9995s=sprintf('0%1.3f',sec);elses=sprintf('%1.3f',sec);endstr=[hms];%---ExecutesjustbeforeKingismadevisible.functionKing_OpeningFcn(hObject,eventdata,handles,varargin)%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigur
8、e%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%vararginco