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

📄 vmp_addconjunctionmap.m

📁 toolbox of BVQX, This is the access between BV and matlab. It will help you to analysis data from BV
💻 M
字号:
function hfile = vmp_AddConjunctionMap(hfile, maps)
% VMP::AddConjunctionMap  - add a conjunction map to a VMP
%
% FORMAT:       [vmp] = vmp.AddConjunctionMap(maps)
%
% Input fields:
%
%       maps        1xN vector specifying the maps to conjugate
%
% Output fields:
%
%       vmp         VMP with added map

% Version:  v0.7b
% Build:    7090215
% Date:     Sep-02 2007, 3:15 PM CEST
% Author:   Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin < 2 || ...
    numel(hfile) ~= 1 || ...
   ~isBVQXfile(hfile, 'vmp') || ...
   ~isa(maps, 'double') || ...
    numel(maps) < 2 || ...
    any(isinf(maps(:)) | isnan(maps(:))) || ...
    any(maps(:) < 1 | maps(:) ~= fix(maps(:)))
    error( ...
        'BVQXfile:BadArgument', ...
        'Invalid call to %s.', ...
        mfilename ...
    );
end
bc = bvqxfile_getcont(hfile.L);
if any(maps(:) > numel(bc.Map))
    error( ...
        'BVQXfile:BadArgument', ...
        'Given map number(s) out of bounds.' ...
    );
end

% maps
maps = maps(:)';
map1 = maps(1);
maps(1) = [];

% get first map
fmap = bc.Map(map1).VMPData;
smap = sign(fmap);

% iterate over conjugate maps
for cc = maps
    fmap = min(abs(fmap), abs(bc.Map(cc).VMPData)) .* ...
        (smap == sign(bc.Map(cc).VMPData)) .* smap;
end

% add conjugated map to VMP
bc.Map(end + 1) = bc.Map(map1);
bc.Map(end).Name = sprintf('%s conjugated with%s', ...
    bc.Map(end).Name, sprintf(' %d', maps));
bc.Map(end).VMPData = fmap;
bvqxfile_setcont(hfile.L, bc);

⌨️ 快捷键说明

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