<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dear Cris,
<div class=""><br class="">
</div>
<div class="">This is a known issue and has been addressed a while ago. You may need to upgrade your fieldtrip version to an up-to-date version.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">JM</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 13 Feb 2018, at 16:54, Cristiano Micheli <<a href="mailto:michelic72@gmail.com" class="">michelic72@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_extra">Dear Team,</div>
<div class="gmail_extra">I am using Matlab 2017 and when I execute the following lines :</div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra">
<div class="gmail_extra">cfg=[];</div>
<div class="gmail_extra">cfg.layout = 'biosemi256.lay';</div>
<div class="gmail_extra">layout = ft_prepare_layout(cfg);</div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra">I get the following error </div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">Error using nargin</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">You can only call nargin/nargout from within a MATLAB function.</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class=""><br class="">
</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">Error in ft_preamble_init (line 34)</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">if nargin==0</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class=""><br class="">
</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">Error in ft_preamble (line 56)</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">   evalin('caller', ['ft_preamble_' cmd]);</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class=""><br class="">
</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">Error in ft_prepare_layout (line 96)</font></i></div>
<div class="gmail_extra"><i class=""><font color="#ff0000" class="">ft_preamble init</font></i></div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra">This seems related to the nargin instruction, which cannot be used in scripts anymore and it is MatLab version specific (does not happen if I use Matlab 2015b).</div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra">Is this a bug?</div>
<div class="gmail_extra">Cris</div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra"><br class="">
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>