Skip to content

Commit

Permalink
documentation - use MATLAB instead of Matlab in the documentation
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.fcdonders.nl/home/svnroot/fieldtrip/trunk@9226 0cf7c7f0-3615-4144-b4e6-68da3bce3cd0
  • Loading branch information
robertoostenveld committed Feb 23, 2014
1 parent 1f4a2cf commit 7ed2eb8
Show file tree
Hide file tree
Showing 30 changed files with 52 additions and 51 deletions.
2 changes: 1 addition & 1 deletion @config/config.m
Expand Up @@ -18,7 +18,7 @@
% to each field are being counted.
%
% The config object can be used throughout your FieldTrip function
% as if it were a plain Matlab structure. At the end of your FieldTrip
% as if it were a plain MATLAB structure. At the end of your FieldTrip
% function you can report the fields that were
% - not used (references=0)
% - locally assigned as compared to assigned by the end user (assignments>0)
Expand Down
4 changes: 2 additions & 2 deletions @config/struct.m
Expand Up @@ -23,7 +23,7 @@
% $Id$

if nargin==1
% convert the config object into a regular Matlab structure
% convert the config object into a regular MATLAB structure
for i=1:numel(x)
y(i) = struct(x(i).value);
end
Expand All @@ -39,7 +39,7 @@
end
end
else
% mimic the behaviour of the builtin Matlab struct function
% mimic the behaviour of the builtin MATLAB struct function
if mod(nargin,2)
error('Incorrect number of input arguments (should be key-value pairs)')
end
Expand Down
2 changes: 1 addition & 1 deletion @config/struct2cell.m
@@ -1,7 +1,7 @@
function c = struct2cell(s)

% STRUCT2CELL Convert structure array to cell array by first converting
% the config objection into a struct and then using standard Matlab call.
% the config objection into a struct and then using standard MATLAB call.

% Copyright (C) 2008, Robert Oostenveld
%
Expand Down
6 changes: 3 additions & 3 deletions Contents.m
@@ -1,7 +1,7 @@
% FieldTrip
% Version unknown fieldtriptoolbox.org DD-MM-YYYY
%
% FieldTrip is the Matlab toolbox for MEG and EEG analysis that is being developed at
% FieldTrip is the MATLAB toolbox for MEG and EEG analysis that is being developed at
% the Centre for Cognitive Neuroimaging of the Donders Institute for Brain, Cognition
% and Behaviour together with collaborating institutes. The FieldTrip software is
% released as open source under the GNU general public license.
Expand All @@ -12,7 +12,7 @@
% supports the data formats of all major MEG systems (CTF, Neuromag, BTi) and of the
% most popular EEG systems, and new formats can be added easily. FieldTrip contains
% high-level functions that you can use to construct your own analysis protocol in
% Matlab. Furthermore, it easily allows developers to incorporate low-level algorithms
% MATLAB. Furthermore, it easily allows developers to incorporate low-level algorithms
% for new EEG/MEG analysis methods.
%
% The FieldTrip software is free but copyrighted software, distributed under the terms
Expand Down Expand Up @@ -58,7 +58,7 @@
% the GPL is not allowed!
%
% Below is an overview of the most important FieldTrip functions, sorted by category.
% You can get more details on a function by typing "help functionname" in Matlab.
% You can get more details on a function by typing "help functionname" in MATLAB.
%
% Preprocessing and reading data
% ft_definetrial
Expand Down
4 changes: 2 additions & 2 deletions besa2fieldtrip.m
Expand Up @@ -7,7 +7,7 @@
% Use as
% [data] = besa2fieldtrip(filename)
% where the filename should point to a BESA datafile (or data that
% is exported by BESA). The output is a Matlab structure that is
% is exported by BESA). The output is a MATLAB structure that is
% compatible with FieldTrip.
%
% The format of the output structure depends on the type of datafile:
Expand All @@ -19,7 +19,7 @@
% *.dat combined with a *.gen or *.generic is converted to a structure similar to the output of PREPROCESSING
%
% Note (*): If the BESA toolbox by Karsten Hochstatter is found on your
% Matlab path, the readBESAxxx functions will be used (where xxx=tfc/swf),
% MATLAB path, the readBESAxxx functions will be used (where xxx=tfc/swf),
% alternatively the private functions from FieldTrip will be used.
%
% See also EEGLAB2FIELDTRIP
Expand Down
2 changes: 1 addition & 1 deletion fieldtrip2fiff.m
Expand Up @@ -188,7 +188,7 @@ function fieldtrip2fiff(filename, data)

% otherwise reconstruct it
fprintf('Reconstructing channel locations, it might be inaccurate\n')
FIFF = fiff_define_constants; % some constants are not defined in the Matlab function
FIFF = fiff_define_constants; % some constants are not defined in the MATLAB function

if isfield(data, 'grad')
hasgrad = true;
Expand Down
2 changes: 1 addition & 1 deletion fileio/ft_create_buffer.m
@@ -1,7 +1,7 @@
function ft_create_buffer(port)

% FT_CREATE_BUFFER starts the thread with the TCP server attached to the local
% Matlab instance. The TCP server will listen to the specified network
% MATLAB instance. The TCP server will listen to the specified network
% port, and accept incoming read and write requests.
%
% Use as
Expand Down
2 changes: 1 addition & 1 deletion fileio/ft_destroy_buffer.m
@@ -1,7 +1,7 @@
function ft_destroy_buffer

% FT_DESTROY_BUFFER stops the thread with the TCP server attached to
% the local Matlab instance and removes all data from memory.
% the local MATLAB instance and removes all data from memory.
%
% Use as
% ft_destroy_buffer
Expand Down
4 changes: 2 additions & 2 deletions fileio/ft_filetype.m
Expand Up @@ -1082,8 +1082,8 @@
content = 'electrophysiological data';
elseif filetype_check_extension(filename, '.mat') && filetype_check_header(filename, 'MATLAB')
type = 'matlab';
manufacturer = 'Matlab';
content = 'Matlab binary data';
manufacturer = 'MATLAB';
content = 'MATLAB binary data';
elseif filetype_check_header(filename, 'RIFF', 0) && filetype_check_header(filename, 'WAVE', 8)
type = 'riff_wave';
manufacturer = 'Microsoft';
Expand Down
4 changes: 2 additions & 2 deletions fileio/ft_read_data.m
Expand Up @@ -750,7 +750,7 @@
ft_hastoolbox('egi_mff', 1);
% ensure that the JVM is running and the jar file is on the path
%%%%%%%%%%%%%%%%%%%%%%
%workaround for Matlab bug resulting in global variables being cleared
%workaround for MATLAB bug resulting in global variables being cleared
globalTemp=cell(0);
globalList=whos('global');
varList=whos;
Expand All @@ -763,7 +763,7 @@
mff_setup;

%%%%%%%%%%%%%%%%%%%%%%
%workaround for Matlab bug resulting in global variables being cleared
%workaround for MATLAB bug resulting in global variables being cleared
varNames={varList.name};
for i=1:length(globalList)
eval([globalList(i).name '=globalTemp{i};']);
Expand Down
4 changes: 2 additions & 2 deletions fileio/ft_read_event.m
Expand Up @@ -993,7 +993,7 @@
% this is multiplexed data in a *.bin file, accompanied by a matlab file containing the header and event
[path, file, ext] = fileparts(filename);
filename = fullfile(path, [file '.mat']);
% read the events from the Matlab file
% read the events from the MATLAB file
tmp = load(filename, 'event');
event = tmp.event;

Expand Down Expand Up @@ -1107,7 +1107,7 @@
end

case 'matlab'
% read the events from a normal Matlab file
% read the events from a normal MATLAB file
tmp = load(filename, 'event');
event = tmp.event;

Expand Down
12 changes: 6 additions & 6 deletions fileio/ft_read_header.m
Expand Up @@ -983,7 +983,7 @@
% ensure that the JVM is running and the jar file is on the path

%%%%%%%%%%%%%%%%%%%%%%
%workaround for Matlab bug resulting in global variables being cleared
%workaround for MATLAB bug resulting in global variables being cleared
globalTemp=cell(0);
globalList=whos('global');
varList=whos;
Expand All @@ -996,7 +996,7 @@
mff_setup;

%%%%%%%%%%%%%%%%%%%%%%
%workaround for Matlab bug resulting in global variables being cleared
%workaround for MATLAB bug resulting in global variables being cleared
varNames={varList.name};
for i=1:length(globalList)
eval(['global ' globalList(i).name ';']);
Expand Down Expand Up @@ -1045,7 +1045,7 @@
hdr.nTrials = 1; % since continuous
hdr.orig = []; % this will contain the chunks (if present)

% add the contents of attached FIF_header chunk after decoding to Matlab structure
% add the contents of attached FIF_header chunk after decoding to MATLAB structure
if isfield(orig, 'neuromag_header')
if isempty(cachechunk)
% this only needs to be decoded once
Expand Down Expand Up @@ -1074,7 +1074,7 @@
hdr.orig = cachechunk;
end

% add the contents of attached RES4 chunk after decoding to Matlab structure
% add the contents of attached RES4 chunk after decoding to MATLAB structure
if isfield(orig, 'ctf_res4')
if isempty(cachechunk)
% this only needs to be decoded once
Expand All @@ -1100,14 +1100,14 @@
hdr.orig.ctf_res4 = orig.ctf_res4;
end

% add the contents of attached NIFTI-1 chunk after decoding to Matlab structure
% add the contents of attached NIFTI-1 chunk after decoding to MATLAB structure
if isfield(orig, 'nifti_1')
hdr.nifti_1 = decode_nifti1(orig.nifti_1);
% add the raw chunk as well
hdr.orig.nifti_1 = orig.nifti_1;
end

% add the contents of attached SiemensAP chunk after decoding to Matlab structure
% add the contents of attached SiemensAP chunk after decoding to MATLAB structure
if isfield(orig, 'siemensap') && exist('sap2matlab')==3 % only run this if MEX file is present
hdr.siemensap = sap2matlab(orig.siemensap);
% add the raw chunk as well
Expand Down
2 changes: 1 addition & 1 deletion ft_analysispipeline.m
Expand Up @@ -42,7 +42,7 @@
% This function uses the nested cfg and cfg.previous that are present in
% the data structure. It will use the configuration and the nested previous
% configurations to climb all the way back into the tree. This funtction
% will print a complete Matlab script to screen (and optionally to file).
% will print a complete MATLAB script to screen (and optionally to file).
% Furthermore, it will show an interactive graphical flowchart
% representation of the steps taken during the pipeline(i). In the flowchart
% you can click on one of the steps to see the configuration details of
Expand Down
6 changes: 3 additions & 3 deletions ft_analysisprotocol.m
Expand Up @@ -2,7 +2,7 @@

% FT_ANALYSISPROTOCOL tries to reconstruct the complete analysis protocol that
% was used to create an arbitrary FieldTrip data structure. It will create
% a Matlab script (as text file) and a flowchart with a graphical
% a MATLAB script (as text file) and a flowchart with a graphical
% representation.
%
% Use as
Expand Down Expand Up @@ -43,7 +43,7 @@
% This function uses the nested cfg and cfg.previous that are present in
% the data structure. It will use the configuration and the nested previous
% configurations to climb all the way back into the tree. This funtction
% will print a complete Matlab script to screen (and optionally to file).
% will print a complete MATLAB script to screen (and optionally to file).
% Furthermore, it will show an interactive graphical flowchart
% representation of the steps taken during the analysis. In the flowchart
% you can click on one of the steps to see the configuration details of
Expand Down Expand Up @@ -175,7 +175,7 @@
try
thisname = getsubfield(datacfg, 'version.name');
if isstruct(thisname)
% I think that this was needed for Matlab 6.5
% I think that this was needed for MATLAB 6.5
thisname = thisname.name;
end
[p, f] = fileparts(thisname);
Expand Down
2 changes: 1 addition & 1 deletion ft_compile_mex.m
Expand Up @@ -20,7 +20,7 @@ function ft_compile_mex(force)
% procedure for setting up the MEX environment.
%
% The logic in this script is to first build a list of files that actually
% need compilation for the particular platform that Matlab is running on,
% need compilation for the particular platform that MATLAB is running on,
% and then to go through that list. Functions are added to the list by
% giving their destination directory and (relative to that) the name of the
% source file (without the .c). Optionally, you can specify a list of
Expand Down
2 changes: 1 addition & 1 deletion ft_defaults.m
Expand Up @@ -126,7 +126,7 @@
end

try
% this directory contains various functions that were obtained from elsewere, e.g. Matlab file exchange
% this directory contains various functions that were obtained from elsewere, e.g. MATLAB file exchange
ft_hastoolbox('fileexchange', 3, 1); % not required
end

Expand Down
4 changes: 2 additions & 2 deletions ft_definetrial.m
Expand Up @@ -18,7 +18,7 @@
% A call to FT_DEFINETRIAL results in the trial definition "trl" being
% added to the output configuration structure. The trials are defined
% according to the triggers, trials or other events in the data, or
% from a user-specified Matlab function (subsequently referred to as
% from a user-specified MATLAB function (subsequently referred to as
% the trial function) which returns "trl". The user can specify the
% name of his/her custom trial function that is tailored to the
% experimental paradigm, or use the default trial function
Expand Down Expand Up @@ -154,7 +154,7 @@

% determine the number of outpout arguments of the user-supplied trial function
try
% the nargout function in Matlab 6.5 and older does not work on function handles
% the nargout function in MATLAB 6.5 and older does not work on function handles
num = nargout(cfg.trialfun);
catch
num = 1;
Expand Down
2 changes: 1 addition & 1 deletion ft_documentationindex.m
Expand Up @@ -152,7 +152,7 @@
currletter = char(96);
fprintf(fid, '====== Index of configuration options ======\n\n');
fprintf(fid, 'A detailed description of each function is available in the [[:reference|reference documentation]].\n\n');
fprintf(fid, 'This index to the reference documentation is automatically generated from the Matlab code every day. Therefore you should not edit this page manually, since your changes would be overwritten automatically. If you want to suggest corrections to the documentation, please send them by email to the mailing list or to one of the main developers (see [[:contact]]).\n\n');
fprintf(fid, 'This index to the reference documentation is automatically generated from the MATLAB code every day. Therefore you should not edit this page manually, since your changes would be overwritten automatically. If you want to suggest corrections to the documentation, please send them by email to the mailing list or to one of the main developers (see [[:contact]]).\n\n');
for i=1:size(index,1)
fprintf('%s -- %s -- %s\n', index{i,2}, index{i,3}, index{i,1});
if isempty(index{i,1})
Expand Down
2 changes: 1 addition & 1 deletion ft_documentationreference.m
Expand Up @@ -116,7 +116,7 @@ function ft_documentationreference(outdir)

fid = fopen(filename, 'wt');
fprintf(fid, '===== %s =====\n\n', upper(funname{i}));
fprintf(fid, 'Note that this reference documentation is identical to the help that is displayed in Matlab when you type "help %s".\n\n', funname{i});
fprintf(fid, 'Note that this reference documentation is identical to the help that is displayed in MATLAB when you type "help %s".\n\n', funname{i});
fprintf(fid, '<html><pre>\n'); % required for docuwiki > use html preformatted style
fprintf(fid, '%s', str);
fprintf(fid, '</pre></html>\n'); % required for docuwiki
Expand Down
1 change: 1 addition & 0 deletions ft_freqanalysis.m
Expand Up @@ -453,6 +453,7 @@

ft_progress('init', cfg.feedback, 'processing trials');
for itrial = 1:ntrials

%disp(['processing trial ' num2str(itrial) ': ' num2str(size(data.trial{itrial},2)) ' samples']);
fbopt.i = itrial;
fbopt.n = ntrials;
Expand Down
4 changes: 2 additions & 2 deletions ft_freqstatistics.m
Expand Up @@ -27,7 +27,7 @@
% cfg.method = different methods for calculating the significance probability and/or critical value
% 'montecarlo' get Monte-Carlo estimates of the significance probabilities and/or critical values from the permutation distribution,
% 'analytic' get significance probabilities and/or critical values from the analytic reference distribution (typically, the sampling distribution under the null hypothesis),
% 'stats' use a parametric test from the Matlab statistics toolbox,
% 'stats' use a parametric test from the MATLAB statistics toolbox,
% 'crossvalidate' use crossvalidation to compute predictive performance
%
% cfg.design = Nxnumobservations: design matrix (for examples/advice, please see the Fieldtrip wiki,
Expand Down Expand Up @@ -330,7 +330,7 @@
statfield = fieldnames(stat);
else
% only the probability was returned as a single matrix, reformat into a structure
dum = stat; stat = []; % this prevents a Matlab warning that appears from release 7.0.4 onwards
dum = stat; stat = []; % this prevents a MATLAB warning that appears from release 7.0.4 onwards
stat.prob = dum;
statfield = fieldnames(stat);
end
Expand Down
2 changes: 1 addition & 1 deletion ft_mvaranalysis.m
Expand Up @@ -480,6 +480,6 @@
%------------------------------------------------------
%---subfunction to ensure that the first two input arguments are of double
% precision this prevents an instability (bug) in the computation of the
% tapers for Matlab 6.5 and 7.0
% tapers for MATLAB 6.5 and 7.0
function [tap] = double_dpss(a, b, varargin)
tap = dpss(double(a), double(b), varargin{:});
2 changes: 1 addition & 1 deletion ft_sliceinterp.m
Expand Up @@ -361,7 +361,7 @@
% merge anatomy, functional data and mask
fprintf('constructing overlay...');
if ischar(cfg.colormap)
% replace string by colormap using standard Matlab function
% replace string by colormap using standard MATLAB function
cfg.colormap = colormap(cfg.colormap);
end
cmap = cfg.colormap;
Expand Down
8 changes: 4 additions & 4 deletions ft_sourceplot.m
Expand Up @@ -1031,7 +1031,7 @@

if strcmp(cfg.colorbar, 'yes'),
if hasfun
% use a normal Matlab colorbar
% use a normal MATLAB colorbar
hc = colorbar;
set(hc, 'YLim', [fcolmin fcolmax]);
else
Expand Down Expand Up @@ -1128,7 +1128,7 @@
axis off
if strcmp(cfg.colorbar, 'yes'),
if hasfun
% use a normal Matlab coorbar
% use a normal MATLAB coorbar
hc = colorbar;
set(hc, 'YLim', [fcolmin fcolmax]);
else
Expand Down Expand Up @@ -1212,7 +1212,7 @@ function plot2D(vols2D, scales, doimage)
hasfun = length(vols2D)>1 && ~isempty(vols2D{2});
hasmsk = length(vols2D)>2 && ~isempty(vols2D{3});

% the transpose is needed for displaying the matrix using the Matlab image() function
% the transpose is needed for displaying the matrix using the MATLAB image() function
if hasana; ana = vols2D{1}'; end;
if hasfun && ~doimage; fun = vols2D{2}'; end;
if hasfun && doimage; fun = permute(vols2D{2},[2 1 3]); end;
Expand Down Expand Up @@ -1443,7 +1443,7 @@ function cb_redraw(h, eventdata)
if opt.hasfun
% vectorcolorbar = linspace(fscolmin, fcolmax,length(cfg.funcolormap));
% imagesc(vectorcolorbar,1,vectorcolorbar);colormap(cfg.funcolormap);
% use a normal Matlab colorbar, attach it to the invisible 4th subplot
% use a normal MATLAB colorbar, attach it to the invisible 4th subplot
try
caxis([opt.fcolmin opt.fcolmax]);
end
Expand Down

0 comments on commit 7ed2eb8

Please sign in to comment.