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

📄 asciitab.m

📁 toolbox of BVQX, This is the access between BV and matlab. It will help you to analysis data from BV
💻 M
字号:
function at = asciitab(tvar, prec, decpoint)
% asciitab  - create custom ASCII representation of 2-D matrix
%
% FORMAT:       ascii = asciitab(tvar [, prec, decpoint])
%
% Input fields:
%
%       tvar        2-D double table data
%       prec        precision argument (for any2ascii)
%       decpoint    locale selectable decimal point character
%
% Output fields:
%
%       ascii       ascii version of table data
%
% See also any2ascii

% Version:  v0.7b
% Build:    7083014
% Date:     Aug-30 2007, 2:45 PM CEST
% Author:   Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin < 1 || ...
   ~isa(tvar, 'double') || ...
   numel(size(tvar)) > 2
    error( ...
        'BVQXtools:BadArgument', ...
        'Invalid or missing tvar argument.' ...
    );
end
if nargin < 2 || ...
   ~isa(prec, 'double')
    prec = 8;
end
if nargin < 3 || ...
   ~ischar(decpoint)
    decpoint = '.';
end

% conversion
at = any2ascii(tvar, prec, 1);

% formatting
at(at == ',' | at == ';' | at == char(9)) = [];
at = strrep(at, '...', '');

% decimal point
at = strrep(at, '.', decpoint);

% get first and last character right
at(end) = char(10);
at = at(2:end);

⌨️ 快捷键说明

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