Hello all!
So I ran into a bug recently when I tried to create BEM surfaces using fieldtrip. I selected only one tissue layer (scalp) and got an error on line 279 of java_dialog.m. Fortunately it was an easy fix so I thought I would share. This should definitely be in the next update. So on line 276 of java_dialog.m, it should use numel instead of length because if there's only one string, length returns the number of characters (4) when it should return the number of elements (1). So this line should look like this:
nbInputs = numel(java_res);
Hope this helps!