【数学建模】基于matlab GUI理发店排队模拟系统【含Matlab源码 1116期】
2021/7/23 11:06:47
本文主要是介绍【数学建模】基于matlab GUI理发店排队模拟系统【含Matlab源码 1116期】,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
一、简介
基于matlab GUI理发店排队模拟系统
二、源代码
function varargout = lifashi_final(varargin) % LIFASHI_FINAL Application M-file for lifashi_final.fig % FIG = LIFASHI_FINAL launch lifashi_final GUI. % LIFASHI_FINAL('callback_name', ...) invoke the named callback. % Last Modified by GUIDE v2.0 15-Aug-2020 00:44:45 if nargin == 0 % LAUNCH GUI fig = openfig(mfilename,'reuse'); % Use system color scheme for figure: set(fig,'Color',get(0,'defaultUicontrolBackgroundColor')); % Generate a structure of handles to pass to callbacks, and store it. handles = guihandles(fig); guidata(fig, handles); if nargout > 0 varargout{1} = fig; end elseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK try if (nargout) [varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard else feval(varargin{:}); % FEVAL switchyard end catch disp(lasterr); end end %| ABOUT CALLBACKS: %| GUIDE automatically appends subfunction prototypes to this file, and %| sets objects' callback properties to call them through the FEVAL %| switchyard above. This comment describes that mechanism. %| %| Each callback subfunction declaration has the following form: %| <SUBFUNCTION_NAME>(H, EVENTDATA, HANDLES, VARARGIN) %| %| The subfunction name is composed using the object's Tag and the %| callback type separated by '_', e.g. 'slider2_Callback', %| 'figure1_CloseRequestFcn', 'axis1_ButtondownFcn'. %| %| H is the callback object's handle (obtained using GCBO). %| %| EVENTDATA is empty, but reserved for future use. %| %| HANDLES is a structure containing handles of components in GUI using %| tags as fieldnames, e.g. handles.figure1, handles.slider2. This %| structure is created at GUI startup using GUIHANDLES and stored in %| the figure's application data using GUIDATA. A copy of the structure %| is passed to each callback. You can store additional information in %| this structure at GUI startup, and you can change the structure %| during callbacks. Call guidata(h, handles) after changing your %| copy to replace the stored original so that subsequent callbacks see %| the updates. Type "help guihandles" and "help guidata" for more %| information. %| %| VARARGIN contains any extra arguments you have passed to the %| callback. Specify the extra arguments by editing the callback %| property in the inspector. By default, GUIDE sets the property to: %| <MFILENAME>('<SUBFUNCTION_NAME>', gcbo, [], guidata(gcbo)) %| Add any extra arguments after the last argument, before the final %| closing parenthesis. % -------------------------------------------------------------------- function varargout = lifashi_Callback(h, eventdata, handles, varargin) % -------------------------------------------------------------------- function varargout = guke_Callback(h, eventdata, handles, varargin) % -------------------------------------------------------------------- function varargout = pushbutton1_Callback(h, eventdata, handles, varargin) ln=str2double(get(handles.lifashi,'string')); axes(handles.axes1) %理发仿真程序 %a(j,i):理发师j在第i分钟正在服务的顾客剩下的时间 %c(i):理发店里的顾客总数 %d(i):理发店等待的顾客数 %S(j) :理发师j的状态,1表示忙,0表示闲 %本程序模拟从第1分钟末到第10分钟末理发店的顾客数目,理发师的状态等情况 %假设理发师对顾客的服务都是从某分钟的末尾开始的 %假设理发师j的工作优先级高于j+1; c(1)=0;d(1)=0; for j=1:ln S(j)=0; a(j,1)=0; end
三、运行结果
四、备注
版本:2014a
这篇关于【数学建模】基于matlab GUI理发店排队模拟系统【含Matlab源码 1116期】的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-13怎么通过 JavaScript 或其他编程语言来实现监听屏幕高度变化功能?-icode9专业技术文章分享
- 2024-11-12聊聊我们那些年用过的表达式引擎组件
- 2024-11-12让项目数据更有说服力:五款必备数据可视化管理工具推荐
- 2024-11-12人到一定年纪,要学会远离多巴胺
- 2024-11-12解读:精益生产管理的目的是什么?如何操作?
- 2024-11-12Sku预研作业
- 2024-11-12文心一言API密钥:分步申请指南
- 2024-11-12初学者指南:轻松掌握后台交互
- 2024-11-12从零开始学习:封装基础知识详解
- 2024-11-12JSON对象入门教程:轻松掌握基础用法