<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br>Dear Fieldtripper,<br><br>How to convert from .dat file to .mat?<br><br>Thank you<br>Hiba<br><br><br><div>> From: fieldtrip-request@science.ru.nl<br>> Subject: fieldtrip Digest, Vol 64, Issue 32<br>> To: fieldtrip@science.ru.nl<br>> Date: Sat, 26 Mar 2016 12:00:01 +0100<br>> <br>> Send fieldtrip mailing list submissions to<br>> fieldtrip@science.ru.nl<br>> <br>> To subscribe or unsubscribe via the World Wide Web, visit<br>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>> or, via email, send a message with subject or body 'help' to<br>> fieldtrip-request@science.ru.nl<br>> <br>> You can reach the person managing the list at<br>> fieldtrip-owner@science.ru.nl<br>> <br>> When replying, please edit your Subject line so it is more specific<br>> than "Re: Contents of fieldtrip digest..."<br>> <br>> <br>> Today's Topics:<br>> <br>> 1. Re: Error with interpn when calling, ft_sourceinterpolate (gj)<br>> 2. Re: Error with interpn when calling, ft_sourceinterpolate<br>> (Schoffelen, J.M. (Jan Mathijs))<br>> <br>> <br>> ----------------------------------------------------------------------<br>> <br>> Message: 1<br>> Date: Fri, 25 Mar 2016 13:29:21 +0100<br>> From: gj <gina.joue@univr.it><br>> To: FieldTrip discussion list <fieldtrip@science.ru.nl><br>> Subject: Re: [FieldTrip] Error with interpn when calling,<br>> ft_sourceinterpolate<br>> Message-ID: <56F52F21.1010900@univr.it><br>> Content-Type: text/plain; charset=utf-8; format=flowed<br>> <br>> Hi Jan-Mathijs,<br>> <br>> Thanks for the prompt reply! Sorry I forgot to say...I tried it in <br>> Matlab R2016a under Linux and Matlab R2012a on a Mac...I suspect I must <br>> have made some error in the steps leading up to source interpolation -- <br>> are there perhaps data checks I can do to narrow down what it could be?<br>> <br>> Thanks!<br>> Gina<br>> <br>> <br>> ><br>> > Message: 7<br>> > Date: Fri, 25 Mar 2016 09:16:12 +0000<br>> > From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen@donders.ru.nl><br>> > To: FieldTrip discussion list <fieldtrip@science.ru.nl><br>> > Subject: Re: [FieldTrip] Error with interpn when calling<br>> > ft_sourceinterpolate<br>> > Message-ID: <D5A86EBD-56B4-4898-96AE-FB993A8B320A@donders.ru.nl><br>> > Content-Type: text/plain; charset="utf-8"<br>> ><br>> > Hi Gina,<br>> ><br>> > What version of MATLAB and operating system are you using? I cannot <br>> get your error reproduced, and from the message it seems a low-level <br>> MATLAB thing, because it complains about the number of input arguments <br>> to a function that is provided by MATLAB. (by the way, the error message <br>> that you got refers to line 152 in interpn, the same error check is done <br>> in my version of interpn at line 151?., which suggests a different <br>> version of the m-file. I was using matlab2014b on a windows machine)<br>> ><br>> > Best,<br>> > Jan-Mathijs<br>> ><br>> ><br>> ><br>> >> On 24 Mar 2016, at 12:30, gj <gina.joue@univr.it> wrote:<br>> >><br>> >> Hi FieldTrip community,<br>> >><br>> >> I am using FieldTrip ver.20160309 and am getting the error:<br>> >><br>> >> Error using interpn (line 152)<br>> >> Wrong number of input arguments.<br>> >><br>> >> Error in ft_sourceinterpolate>my_interpn (line 673)<br>> >> av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);<br>> >><br>> >> while trying to interpolate onto a template brain after having done <br>> source reconstruction. This question had been posted before several <br>> years ago but don't know how to "fix" the problem:<br>> >><br>> >> http://mailman.science.ru.nl/pipermail/fieldtrip/2013-March/006347.html<br>> >><br>> >> Here is my code leading to the error when calling ft_sourceinterpolate:<br>> >><br>> >> %-- snippet--%<br>> >> % sensor level Fourier spectra<br>> >> cfg = [];<br>> >> cfg.method = 'mtmfft';<br>> >> cfg.output = 'fourier';<br>> >> cfg.keeptrials = 'yes';<br>> >> cfg.tapsmofrq = 2;<br>> >> cfg.foi = 13;<br>> >> freqsens = ft_freqanalysis(cfg, data);<br>> >><br>> >> % source reconstruction<br>> >> cfg = [];<br>> >> cfg.frequency = freqsens.freq;<br>> >> cfg.elec = elec;<br>> >> cfg.method = 'eloreta';<br>> >> cfg.grid = lf;<br>> >> cfg.vol = vol;<br>> >> cfg.keeptrials = 'yes';<br>> >> cfg.rawtrial = 'yes';<br>> >> source = ft_sourceanalysis(cfg, freqsens);<br>> >><br>> >> % project to direction explaining most source variance<br>> >> cfg = [];<br>> >> cfg.projectmom = 'yes';<br>> >> source_proj = ft_sourcedescriptives(cfg,source);<br>> >><br>> >> source_proj.dim = template_grid.sourcemodel.dim;<br>> >> source_proj.pos = template_grid.sourcemodel.pos;<br>> >><br>> >> %%....... interpolate onto the MNI template brain<br>> >> cfg = [];<br>> >> cfg.voxelcoord = 'no';<br>> >> cfg.parameter = 'avg.pow';<br>> >> cfg.interpmethod = 'nearest';<br>> >> source_int = ft_sourceinterpolate(cfg, source_proj, template_mri);<br>> >><br>> >> %-- end snippet--%<br>> >><br>> >><br>> >> Any help greatly appreciated!<br>> >> Gina<br>> >> _______________________________________________<br>> >> fieldtrip mailing list<br>> >> fieldtrip@donders.ru.nl<br>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>> ><br>> <br>> <br>> ------------------------------<br>> <br>> Message: 2<br>> Date: Fri, 25 Mar 2016 13:38:57 +0000<br>> From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen@donders.ru.nl><br>> To: FieldTrip discussion list <fieldtrip@science.ru.nl><br>> Subject: Re: [FieldTrip] Error with interpn when calling,<br>> ft_sourceinterpolate<br>> Message-ID: <40EEF91F-360C-46B7-9E24-2163FEA99CF6@donders.ru.nl><br>> Content-Type: text/plain; charset="utf-8"<br>> <br>> <br>> Hi Gina,<br>> <br>> What is the content of the source_proj.pos and source_proj.dim fields before you replace them with the values from the template grid?<br>> Specifically, what?s size(source_proj.pos,1) and source_proj.dim?<br>> <br>> Best,<br>> Jan-Mathijs<br>> <br>> > On 25 Mar 2016, at 13:29, gj <gina.joue@univr.it> wrote:<br>> > <br>> > Hi Jan-Mathijs,<br>> > <br>> > Thanks for the prompt reply! Sorry I forgot to say...I tried it in Matlab R2016a under Linux and Matlab R2012a on a Mac...I suspect I must have made some error in the steps leading up to source interpolation -- are there perhaps data checks I can do to narrow down what it could be?<br>> > <br>> > Thanks!<br>> > Gina<br>> > <br>> > <br>> >> <br>> >> Message: 7<br>> >> Date: Fri, 25 Mar 2016 09:16:12 +0000<br>> >> From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen@donders.ru.nl><br>> >> To: FieldTrip discussion list <fieldtrip@science.ru.nl><br>> >> Subject: Re: [FieldTrip] Error with interpn when calling<br>> >> ft_sourceinterpolate<br>> >> Message-ID: <D5A86EBD-56B4-4898-96AE-FB993A8B320A@donders.ru.nl><br>> >> Content-Type: text/plain; charset="utf-8"<br>> >> <br>> >> Hi Gina,<br>> >> <br>> >> What version of MATLAB and operating system are you using? I cannot get your error reproduced, and from the message it seems a low-level MATLAB thing, because it complains about the number of input arguments to a function that is provided by MATLAB. (by the way, the error message that you got refers to line 152 in interpn, the same error check is done in my version of interpn at line 151?., which suggests a different version of the m-file. I was using matlab2014b on a windows machine)<br>> >> <br>> >> Best,<br>> >> Jan-Mathijs<br>> >> <br>> >> <br>> >> <br>> >>> On 24 Mar 2016, at 12:30, gj <gina.joue@univr.it> wrote:<br>> >>> <br>> >>> Hi FieldTrip community,<br>> >>> <br>> >>> I am using FieldTrip ver.20160309 and am getting the error:<br>> >>> <br>> >>> Error using interpn (line 152)<br>> >>> Wrong number of input arguments.<br>> >>> <br>> >>> Error in ft_sourceinterpolate>my_interpn (line 673)<br>> >>> av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);<br>> >>> <br>> >>> while trying to interpolate onto a template brain after having done source reconstruction. This question had been posted before several years ago but don't know how to "fix" the problem:<br>> >>> <br>> >>> http://mailman.science.ru.nl/pipermail/fieldtrip/2013-March/006347.html<br>> >>> <br>> >>> Here is my code leading to the error when calling ft_sourceinterpolate:<br>> >>> <br>> >>> %-- snippet--%<br>> >>> % sensor level Fourier spectra<br>> >>> cfg = [];<br>> >>> cfg.method = 'mtmfft';<br>> >>> cfg.output = 'fourier';<br>> >>> cfg.keeptrials = 'yes';<br>> >>> cfg.tapsmofrq = 2;<br>> >>> cfg.foi = 13;<br>> >>> freqsens = ft_freqanalysis(cfg, data);<br>> >>> <br>> >>> % source reconstruction<br>> >>> cfg = [];<br>> >>> cfg.frequency = freqsens.freq;<br>> >>> cfg.elec = elec;<br>> >>> cfg.method = 'eloreta';<br>> >>> cfg.grid = lf;<br>> >>> cfg.vol = vol;<br>> >>> cfg.keeptrials = 'yes';<br>> >>> cfg.rawtrial = 'yes';<br>> >>> source = ft_sourceanalysis(cfg, freqsens);<br>> >>> <br>> >>> % project to direction explaining most source variance<br>> >>> cfg = [];<br>> >>> cfg.projectmom = 'yes';<br>> >>> source_proj = ft_sourcedescriptives(cfg,source);<br>> >>> <br>> >>> source_proj.dim = template_grid.sourcemodel.dim;<br>> >>> source_proj.pos = template_grid.sourcemodel.pos;<br>> >>> <br>> >>> %%....... interpolate onto the MNI template brain<br>> >>> cfg = [];<br>> >>> cfg.voxelcoord = 'no';<br>> >>> cfg.parameter = 'avg.pow';<br>> >>> cfg.interpmethod = 'nearest';<br>> >>> source_int = ft_sourceinterpolate(cfg, source_proj, template_mri);<br>> >>> <br>> >>> %-- end snippet--%<br>> >>> <br>> >>> <br>> >>> Any help greatly appreciated!<br>> >>> Gina<br>> >>> _______________________________________________<br>> >>> fieldtrip mailing list<br>> >>> fieldtrip@donders.ru.nl<br>> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>> >> <br>> > _______________________________________________<br>> > fieldtrip mailing list<br>> > fieldtrip@donders.ru.nl<br>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> _______________________________________________<br>> fieldtrip mailing list<br>> fieldtrip@donders.ru.nl<br>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>> <br>> End of fieldtrip Digest, Vol 64, Issue 32<br>> *****************************************<br></div> </div></body>
</html>