Back to the main page.

Bug 1552 - implement ft_math_xxx functions

Status CLOSED FIXED
Reported 2012-06-24 15:58:00 +0200
Modified 2019-08-10 11:56:14 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2012-06-24 15:58:33 +0200

Rather than doing (see http://fieldtrip.fcdonders.nl/example/preprocessing_eeg?&#computing_and_plotting_the_erp_s) difference = task1; % copy one of the structures difference.avg = task1.avg - task2.avg; % compute the difference ERP cfg = []; cfg.layout = 'mpi_customized_acticap64.mat'; cfg.interactive = 'yes'; ft_multiplotER(cfg, difference) it would be better for tracking the modifications to the data by difference = ft_math_subtract([], task1, task2) Other functions could be ft_math_add (or sum, N>1 inputs) ft_math_divide (two inputs) ft_math_multiply (N>1 inputs) ft_math_log10 (one input only) and perhaps also ft_math_mean (N>1 inputs) ft_math_std (N>1 inputs) Rather than ft_math_xxx we could also make a ft_math function where the operation is in the cfg. At least the cfg should be useable to specify the parameter on which to do the math operation. TODO: discuss in the FT meeting


Robert Oostenveld - 2012-10-13 17:09:32 +0200

I have implemented an ft_math with cfg.operation and cfg.value (in case there is only one input data structure). Also implemented a test script. Committed revision 6750. See http://code.google.com/p/fieldtrip/source/detail?r=6750 for all details.


Robert Oostenveld - 2019-08-10 11:56:14 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.