[FieldTrip] Conflicting pca functions in Matlab and FT

Eelke Spaak eelke.spaak at donders.ru.nl
Wed Jul 9 16:45:18 CEST 2014


Hi,

To my knowledge, the only pca.m is included in
/external/dmlt/external/murphy/. This is rarely used. The PCA analysis
performed by ft_componentanalysis is implemented inline in that
function (as it is a very straightforward algorithm). The
/external/dmlt/ is, I believe, not added to the path by ft_defaults,
so it should not conflict if you add FieldTrip to your path properly
(i.e. by *not* using addpath(genpath(<ft)) ).

If I'm mistaken and it is added to the path by default, you can safely
remove it from the path by calling rmpath(...).

Best,
Eelke

On 9 July 2014 16:35, Niccolò Pescetelli <niccol000 at yahoo.it> wrote:
> Hi!
>
> I just noted that fieldtrip has a function called pca.m to perform principal
> component analysis.
> The problem with this is that also the standard MATLAB toolbox contains a
> pca.m function to perform PCA, but the two functions are not compatible with
> each other and cause unwanted calls depending on the position in your search
> path. For example at the moment I want to use the MATLAB pca function to
> analyse behavioural data, but at some point I might need the FT pca one ot
> analyse MEG data.
>
> How can I fix this bug? I think changing the name to the function in FT is
> going to be risky
>
>
> Thanks!
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list