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

📄 mkaccel.m

📁 数字通信第四版原书的例程
💻 M
字号:
function mkaccel(sys)
%MKACCEL(SYS) builds the specified block diagram's MEX file.
%	Calling this function is equivalent to choosing
%	'Build Accelerator...' from the Simulate menu.

%	Rick Spada  11-23-92
%	Copyright (c) 1990-94 by The MathWorks, Inc.

% if no sys specified, use the current block diagram
if nargin==0,
  sys=get_param;
end;

% no block diagram, go bye
if isempty(sys),
  error('No block diagram specified.');
end;

% get the compile command, and change '$model' to the model name
compile_command=strrep(get_param(sys,'Compile command'),'$model',sys);

% last thing to do is to codegen the block diagram and  evaluate
% the compile command
genres=gencode(sys);
if genres~= 0.
  disp(compile_command);
  eval(compile_command);
end

⌨️ 快捷键说明

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