📄 orthrtc.m
字号:
function orthrtc(filename, newfilename)
% orthrtc - orthogonalize RTC object in file
%
% FORMAT: orthrtc(filename [, newfilename]);
%
% Input fields:
%
% filename RTC file
% newfilename SaveAs filename (default: *_orth.rtc)
%
% No output fields
% Version: v0.7a
% Build: 7082721
% Date: Aug-27 2007, 9:39 PM CEST
% Author: Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools
% argument check
if nargin < 1 || ...
~ischar(filename) || ...
isempty(filename)
error( ...
'BVQXtools:BadArgument', ...
'Valid matrix of vectors without Inf/Nans are required.' ...
);
end
filename = filename(:)';
if nargin < 2 || ...
~ischar(newfilename) || ...
isempty(newfilename)
[fp{1:3}] = fileparts(filename);
if isempty(fp{1})
fp{1} = '.';
end
newfilename = [fp{1} filesep fp{2} '_orth.rtc'];
end
% try loading RTC
rtc = [];
rtcl = true;
try
[rtc, rtcl] = BVQXfile(filename);
if ~isBVQXfile(rtc, 'rtc')
error('NO_RTC');
end
catch
if isBVQXfile(rtc, true) && ...
rtcl
rtc.ClearObject;
end
error( ...
'BVQXtools:BadArgument', ...
'No RTC file loadable.' ...
);
end
% orthogonalize RTCMatrix
rtc.RTCMatrix = orthvecs(rtc.RTCMatrix);
% SaveAs
rtc.SaveAs(newfilename);
if rtcl
rtc.ClearObject;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -