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

📄 refresh.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function dummy = refresh(r)
%REFRESH  Reopens all RTDX channels that are severed during a program load
%   REFRESH(R) - After loading a new program file in Code Compser
%   Studio(tm), all RTDX handles become 'stale'.  Even if the new 
%   program file contains equivalently named and configured channels, 
%   it is necessary to reopen the channels.   This method restablishes
%   previously opened RTDX channels defined in R.
%
%   See also CLOSE, OPEN.

% Copyright 2002 The MathWorks, Inc.
% $Revision: 1.2 $ $Date: 2002/03/22 21:43:21 $

chan = get(r,'RtdxChannel');
close(r,'all');

for ic = 1:r.numChannels,
    name = chans{ic,1};
    enstat = chans{ic,2};
    ctype = chans{ic,3};
    try
        open(r,name,ctype);
    catch
        disp(lasterr);
        warning(['Failed to open channel: ''' name '''']);
    end
end

% [EOF] refresh.m

⌨️ 快捷键说明

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