<div dir="ltr">Dear SimNIBS,<div><br></div><div>I recently used SimNIBS 4. I have a question about scripting simulation with Matlab. The GUI is working fine in SimNIBS 4. But when I run my script in Matlab I get the following error:</div><div><br><div><b>%% General information<br><br>S = sim_struct('SESSION');<br>S.subpath = 'm2m_sub01'; % subject folder<br>S.pathfem = 'tdcs_simu'; % Folder for the simulation output<br>S.map_to_surf = true; <br><br>%% Define tDCS simulation<br>S.poslist{1} = sim_struct('TDCSLIST');<br>S.poslist{1}.currents = [0.002, -0.002]; % Current flow though each channel (A)<br><br>%First Electrode<br>S.poslist{1}.electrode(1).channelnr = 1; % Connect the electrode to the first channel<br>S.poslist{1}.electrode(1).centre = 'F4'; % Place it over F4<br>S.poslist{1}.electrode(1).shape = 'rect'; %Rectangular electrode<br>S.poslist{1}.electrode(1).dimensions = [50, 70]; % Dimension in mm<br>S.poslist{1}.electrode(1).thickness = 4; % 4 mm thickness<br><br>%Second Electrode<br>S.poslist{1}.electrode(2).channelnr = 2;<br>S.poslist{1}.electrode(2).centre = 'F3';<br>S.poslist{1}.electrode(2).shape = 'rect';<br>S.poslist{1}.electrode(2).dimensions = [50, 70];<br>S.poslist{1}.electrode(2).thickness = 4;<br><br>%% Run Simulation<br>run_simnibs(S);</b><br></div><div><b><br></b></div><div><b><br></b></div><div>Error using run_simnibs (line 30)<br>There was an error running SimNIBS:<br> Traceback (most recent call last):<br> File "/home/incas/SimNIBS-4.0/simnibs_env/lib/python3.9/site-packages/simnibs/cli/run_simnibs.py", line 7, in <module><br> from simnibs import run_simnibs<br> File "/home/incas/SimNIBS-4.0/simnibs_env/lib/python3.9/site-packages/simnibs/__init__.py", line 21, in <module><br> from .mesh_tools import *<br> File "/home/incas/SimNIBS-4.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/__init__.py", line 6, in <module><br> from .mesh_io import *<br> File "/home/incas/SimNIBS-4.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/mesh_io.py", line 49, in <module><br> from . import cgal<br> File "/home/incas/SimNIBS-4.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/__init__.py", line 1, in <module><br> from .create_mesh_surf import *<br>ImportError: /home/incas/SimNIBS-4.0/simnibs_env/lib/python3.9/site-packages/simnibs/mesh_tools/cgal/<a href="http://create_mesh_surf.cpython-39-x86_64-linux-gnu.so">create_mesh_surf.cpython-39-x86_64-linux-gnu.so</a>: undefined<br>symbol: __gmpq_add<br><br><br>Error in tDCS (line 27)<br>run_simnibs(S);<b><br></b></div><div><br><div><br></div><div>I look forward to hearing from you.<br></div><div><br></div><div>Best regards,</div><div>Peyman</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Peyman Ghobadi-Azbari<br><font color="#888888">
<div></div></font></div><br></div></div></div></div></div></div></div>