<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Dear 姜文浩,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">If you want to do ’straightforward’ fMRI analysis I would not recommend to use FieldTrip for this.</div>
<div class=""><br class="">
</div>
<div class="">However, if you are adamant, you need to be sure to have at least the latest version of the code (which you didn’t specify), and you need to provide the readership with some additional pointers. I don’t know where to get the data you reportedly
 use, so even if I were to make some time to look into this for/with you, I wouldn’t know how to start.</div>
<div class=""><br class="">
</div>
<div class="">So: how did you get the data to execute the code on this ‘getting started’ page, etc?</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""> <br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 22 Dec 2021, at 09:57, 姜文浩 via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">Dear fieldtrippers.</span>
</p>
<p style="font-family:SimSun;" class=""><br class="">
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">I am currently new to fieldtrip, and would like to analysis fMRI data with the toolbox. </span>
</p>
<p style="font-family:SimSun;" class=""><br class="">
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">I started by following</span><span style="font-family:Times New Roman;" class=""> the instructions on "</span><span style="font-family:"Times New Roman";" class="">Getting
 started with fMRI timeseries data</span><span style="display:none;font-family:"Times New Roman";" id="__kindeditor_bookmark_start_26__" class=""></span><span style="font-family:Times New Roman;" class="">" (</span><span style="font-family:Times New Roman;" class=""><a href="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/getting_started/fmri/__;!!HJOPV4FYYWzcc1jazlU!5_RROW62nG12rLQWnGoshRrXo0O_fMYIBRdOGqo9WFIxNQcE4a2ibWEbL7ZR3f1P6HKHyCJHJL0N037uitdhW0nGiTz4F8b3dK6slw$" class="">https://www.fieldtriptoolbox.org/getting_started/fmri/</a></span><span style="font-family:Times New Roman;" class="">).
 However, when executing the command </span> </p>
<div style="font-family: SimSun;" class=""><br class="webkit-block-placeholder">
</div>
<pre class="highlight" style="box-sizing:border-box;font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;color:#212529;background:#F0F0F0;"><code style="box-sizing:border-box;font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:inherit;color:inherit;word-break:normal;" class=""><span class="n" style="box-sizing:border-box;">filename4d</span> <span class="o" style="box-sizing:border-box;color:#666666;">=</span> <span class="s1" style="box-sizing:border-box;color:#4070A0;">'sub-01_ses-mri_task-facerecognition_run-01_bold.nii'</span><span class="p" style="box-sizing:border-box;">;</span></code></pre>
<pre class="highlight" style="box-sizing:border-box;font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;color:#212529;background:#F0F0F0;"><code style="box-sizing:border-box;font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:inherit;color:inherit;word-break:normal;" class=""><span class="n" style="box-sizing:border-box;">volume4d</span> <span class="o" style="box-sizing:border-box;color:#666666;">=</span> <span class="n" style="box-sizing:border-box;">ft_read_mri</span><span class="p" style="box-sizing:border-box;">(</span><span class="n" style="box-sizing:border-box;">filename4d</span><span class="p" style="box-sizing:border-box;">,</span> <span class="s1" style="box-sizing:border-box;color:#4070A0;">'outputfield'</span><span class="p" style="box-sizing:border-box;">,</span> <span class="s1" style="box-sizing:border-box;color:#4070A0;">'functional'</span><span class="p" style="box-sizing:border-box;">);</span></code></pre>
<span style="font-family:Times New Roman;" class="">I got a resulting </span><span style="font-family:Times New Roman;" class="">struct with
</span><span style="font-family:Times New Roman;" class="">the field "anatomy", which is a 4D double,</span><span style="font-family:Times New Roman;" class=""> but not "functional</span><span style="font-family:Times New Roman;" class="">" as it supposed to
 be regarding the manual</span><span style="font-family:Times New Roman;" class="">.</span>
<div class=""><br class="webkit-block-placeholder">
</div>
<p style="font-family:SimSun;" class=""><br class="">
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">Moreover, when I proceeded with the remaining code trying to
</span><span style="font-family:Times New Roman;" class="">represent the 4D timeseries data as a source representation</span><span style="font-family:Times New Roman;" class="">, I got an error saying</span>
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">Arrays have incompatible sizes for this operation.</span>
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">Error in ft_sourceplot>cb_redraw (line 1550)</span><br class="">
<span style="font-family:Times New Roman;" class="">if any([xi yi zi] > functional.dim) || any([xi yi zi] <= 0)</span><br class="">
<br class="">
<span style="font-family:Times New Roman;" class="">Error in ft_sourceplot (line 1106)</span><br class="">
<span style="font-family:Times New Roman;" class="">    cb_redraw(h);</span><br class="">
<span style="font-family:Times New Roman;" class=""></span></p>
<p style="font-family:SimSun;" class=""><br class="">
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class=""> How can I fix the problem?</span>
</p>
<p style="font-family:SimSun;" class=""><br class="">
</p>
<p style="font-family:SimSun;" class=""><span style="font-family:Times New Roman;" class="">Thanks in advance!</span>
</p>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5_RROW62nG12rLQWnGoshRrXo0O_fMYIBRdOGqo9WFIxNQcE4a2ibWEbL7ZR3f1P6HKHyCJHJL0N037uitdhW0nGiTz4F8YAuu5JUw$
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>