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

📄 iswritable.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function bool = iswritable(r, channelName)
%ISWRITABLE Check if specified RDTX(tm) channel is writable.
%   ISWRITABLE(R, CHANNEL) returns a Boolean value signifying whether an RTDX 
%   channel specified by the string CHANNEL, and as defined in the RTDX object 
%   R, is configured for 'write' operation.

% Copyright 2001-2002 The MathWorks, Inc.
% $Revision: 1.13 $ $Date: 2002/06/12 15:30:17 $

error(nargchk(2,2,nargin))

if ~ischar(channelName),
	error('Channel name must be a character string.');
elseif isempty(channelName),
	error('Channel name cannot be an empty string.');
end

% Check if the channelName is an existing open channel
chID=strmatch(channelName, {r.RtdxChannel{:,1}}, 'exact');
if isempty(chID),
    error('Specified channel is not open.');
end

if strcmpi(r.RtdxChannel{chID, 3},'w'),
    bool = logical(1);
elseif strcmpi(r.RtdxChannel{chID, 3},'r'),
    bool = logical(0);
else
    error('Specified channel is not properly initialized.');
end

% [EOF] iswritable.m

⌨️ 快捷键说明

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