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

📄 correlinvtstat.m

📁 toolbox of BVQX, This is the access between BV and matlab. It will help you to analysis data from BV
💻 M
字号:
function r = correlinvtstat(t, n)
% correltstat  - convert t-statistic into correlation value
%
% FORMAT:       r = correlinvtstat(t, n)
%
% Input fields:
%
%       t           t statistic
%       n           number of points in correlated series
%
% Output fields:
%
%       r           matching correlation r
%
% See also correltstat

% Version:  v0.7b
% Build:    7090609
% Date:     Sep-06 2007, 9:01 AM CEST
% Author:   Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin < 2 || ...
   (~isa(t, 'double') && ...
    ~isa(t, 'single')) || ...
   (~isa(n, 'double') && ...
    ~isa(n, 'single')) || ...
    isempty(t) || ...
    isempty(n) || ...
    any(isnan(t(:)) | isinf(t(:))) || ...
    any(isinf(n(:)) | isnan(n(:)) | n(:) < 2)
    error( ...
        'BVQXtools:BadArgument', ...
        'Missing or invalid argument given.' ...
    );
end
osize = size(t);
if numel(t) == 1 && ...
    numel(n) > 1
    osize = size(t);
end
t = t(:);
n = n(:);

% formula
r = reshape(t ./ sqrt(t .* t + n - 2), osize);

⌨️ 快捷键说明

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