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

📄 istransio.m

📁 toolbox of BVQX, This is the access between BV and matlab. It will help you to analysis data from BV
💻 M
字号:
function isf = istransio(htio, varargin)
% istransio  - check (and validate) object
%
% FORMAT:       isf = istransio(hfile [, valid])
%
% Input fields:
%
%       hfile       MxN argument check for class
%       valid       if given and true, perform validation
%
% Output fields:
%
%       isf         either plain false or logical array of input
%                   size with check result (for validity check)

% Version:  v0.6e
% Build:    7030215
% Date:     Mar-02 2007, 3:35 PM CET
% Author:   Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% base argument check
if nargin < 1
    error( ...
        'BVQXtools:TooFewArguments', ...
        'At least one input argument is required.' ...
    );
end
chstrict = false;
if nargin > 1 && ...
    numel(varargin{1}) == 1 && ...
   (isnumeric(varargin{1}) || ...
    islogical(varargin{1}))
    if varargin{1}
        chstrict = true;
    end
end

% class check
if isa(htio, 'transio')
    stio = struct(htio);
    isf = logical(osz(stio));
else
    isf = false;
    return;
end

% validation ?
if chstrict

    % make struct and check fields
    sflds = fieldnames(stio);
    if length(sflds) ~= 6 || ...
       ~all(strcmp(sflds, ...
           {'FileName'; ...
            'LittleND'; ...
            'DataType'; ...
            'TypeSize'; ...
            'IOOffset'; ...
            'DataDims'}))
        isf(:) = false;
        return;
    end
end

⌨️ 快捷键说明

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