<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="">
Hi Mahmoud,
<div class=""><br class="">
</div>
<div class="">The argument â€˜vertexcolor’ into ft_plot_mesh should be a column-vector, with the number of elements equal to the number of positions in the sourcemodel (i.e. the number of rows in bnd.pos). You did not specify in your question what the dimensionality
 is of the variable leadfield (nor whether it is a matrix, a cell-array, or something else).</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 2 Sep 2020, at 19:04, Mahmoud Trabulsi <<a href="mailto:mahmoud_trabulsi@ieee.org" class="">mahmoud_trabulsi@ieee.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">Hello,</div>
I obtained the lead field matrix using both openmeeg and bemcp
<div class="">When I tried to visualize the result in a similar pattern like the openmeeg example</div>
<div class="">I got the following error:</div>
<div class="">Error using ft_plot_mesh (line 488)<br class="">
Unknown color specification for the vertices</div>
<div class=""><br class="">
</div>
<div class="">I used the following function: figure; ft_plot_mesh(bnd, 'vertexcolor', leadfield(:,1))</div>
<div class="">with bnd being a structure have the points and the trianglar elements<br class="">
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 16px;" class="">
<b class="">Mahmoud Trabulsi</b></div>
<div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 16px;" class="">
<b class="">LinkedIn</b>: <b style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont;font-size:15px" class=""><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:9.5pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit;letter-spacing:0.15pt" class=""><a href="http://linkedin.com/in/okondakji" rel="noopener noreferrer" style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline" target="_blank" class="">linkedin.com/in/<span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit" class=""></span><span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit" class="">mahmoud-trabulsi</span><span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit" class=""></span></a></span></b></div>
<div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 16px;" class="">
<b class="">Mobile</b>: +961 71 757425 </div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<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://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>