<div dir="ltr"><div>Dear All,</div><div><br></div><div>Here is my scripts for source analysis, when I run it, I face with error mentioned below,</div><div><br></div><div><font face="courier new, monospace">load 'standard_bem.mat'</font><br>
</div><div><font face="courier new, monospace">cfg = []; </font></div><div><font face="courier new, monospace">cfg.method = 'dics';</font></div><div><font face="courier new, monospace">cfg.frequency = 10; </font></div>
<div><font face="courier new, monospace">cfg.grid = grid; </font></div><div><font face="courier new, monospace">cfg.elec=ft_read_sens('standard_1020.elc');</font></div><div><font face="courier new, monospace">cfg.vol = vol;</font></div>
<div><font face="courier new, monospace">sourcePost_nocon = ft_sourceanalysis(cfg,freq);<br></font></div><div><font face="courier new, monospace"><br></font></div><div><div><font color="#ff0000" face="arial narrow, sans-serif">??? Error using ==> svd</font></div>
<div><font color="#ff0000" face="arial narrow, sans-serif">Input to SVD must not contain NaN or Inf.</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"><br></font></div><div><font color="#ff0000" face="arial narrow, sans-serif">Error in ==> beamformer_dics>pinv at 650</font></div>
<div><font color="#ff0000" face="arial narrow, sans-serif"> [U,S,V] = svd(A,0);</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"><br></font></div><div><font color="#ff0000" face="arial narrow, sans-serif">Error in ==> beamformer_dics at 339</font></div>
<div><font color="#ff0000" face="arial narrow, sans-serif"> filt = pinv(lf' * invCf * lf) * lf' *</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"> invCf; % Gross eqn. 3,</font></div>
<div><font color="#ff0000" face="arial narrow, sans-serif"> use PINV/SVD to cover rank deficient</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"> leadfield</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"><br>
</font></div><div><font color="#ff0000" face="arial narrow, sans-serif">Error in ==> ft_sourceanalysis at 567</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"> dip(i) = beamformer_dics(grid, sens,</font></div>
<div><font color="#ff0000" face="arial narrow, sans-serif"> vol, [], squeeze(Cf(i,:,:)),</font></div><div><font color="#ff0000" face="arial narrow, sans-serif"> optarg{:});</font></div></div><div><font color="#ff0000" face="arial narrow, sans-serif"><br>
</font></div><div><font face="arial narrow, sans-serif" color="#000000">Thank you in advance,</font></div><div><font face="arial narrow, sans-serif" color="#000000"><br></font></div><div><font face="arial narrow, sans-serif" color="#000000">Best,</font></div>
<div><font face="arial narrow, sans-serif" color="#000000">Keyvan</font></div></div>