📄 psctrans.m
字号:
function [psctc, pscf] = psctrans(tc, dim)
% psctrans - perform PSC transformation on time course
%
% FORMAT: [psctc, pscf] = psctrans(tc, [dim])
%
% Input fields:
%
% tc time course data
% dim temporal dimension (default: 1)
%
% Output fields:
%
% psctc PSC transformed time course
% pscf PSC transformation factor
%
% See also ztrans
% Version: v0.5c
% Build: 6120415
% Date: Dec-04 2006, 3:15 PM CET
% Author: Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools
% check arguments
if nargin < 1 || ...
~isa(tc, 'double') || ...
isempty(tc)
error( ...
'BVQXtools:BadArgument', ...
'Invalid time course data given.' ...
);
end
if nargin < 2 || ...
~isa(dim, 'double') || ...
numel(dim) ~= 1 || ...
isinf(dim) || ...
isnan(dim) || ...
fix(dim) ~= dim || ...
dim < 1 || ...
dim > length(size(tc))
dim = 1;
end
% get repmat argument
stc = ones(1, length(size(tc)));
stc(dim) = size(tc, dim);
% build mean and then PSC factor
pscf = mean(tc, dim);
pscf = 100 ./ pscf;
% build PSC (psctc = 100 * tc / M(tc))
psctc = tc .* repmat(pscf, stc);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -