<div dir="ltr"><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Hi, </span><span lang="EN-GB"></span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> </span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">I
have been trying to do a ROI analysis using surface, as in your page </span><span style="font-size:12pt;font-family:Arial,sans-serif"><a href="https://simnibs.github.io/simnibs/build/html/tutorial/analysis.html" target="_blank" style="color:rgb(5,99,193)"><span lang="EN-GB" style="color:rgb(17,85,204)">https://simnibs.github.io/simnibs/build/html/tutorial/analysis.html</span></a></span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">. I copied your example and changed the mesh to mine.
I interpolated my mesh to the surface, using map_to_surface when I run the
simulation. However, when I try to do the ROI analysis, I get an error in the
line head_mesh.node_data{end}.name = region_name. The error says that we
can't find the lh.4 region. I do not understand why this error happens. </span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> </span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">Could
you help me, please? Below you can see my code</span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> </span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">sub=fullfile(foldersPath(time).folder,foldersPath(time).name,'mni_icbm152_t1_tal_TDCS_1_scalar.msh');<br>
head_mesh = mesh_load_gmsh4(sub);</span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">pwd='C:\Users\Workspace-user\Documents\...\mni_icbm152_nlin_sym_09a';<br>
[labels, snames] = subject_atlas(head_mesh, fullfile(pwd,
'm2m_mni_icbm152_t1_tal\'), 'HCP_MMP1');<br>
 region_name = 'lh.4';<br>
roi_idx=find(strcmpi(snames, region_name));<br>
node_idx = labels.node_data{end}.data==roi_idx;</span></p>

<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">% Plot the ROI</span><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">head_mesh.node_data{end+1}.data =
int8(node_idx);</span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">head_mesh.node_data{end}.name = region_name;</span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">mesh_show_surface(head_mesh, 'field_idx',
region_name)</span></span><span lang="EN-GB"></span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif"> </span></p>

<p class="MsoNormal" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB" style="font-size:12pt;font-family:Arial,sans-serif">Thank
you for your help, </span></p></div>