FEM tensor computing error: The matrix dimensions must be consistent

When I run the tutorial FEM Tensor, the error occured

** Call stack:
** >process_fem_tensors.m>Compute at 169
** >process_fem_tensors.m>ComputeInteractive at 375
** >process_fem_tensors.m at 24
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@process_fem_tensors,'ComputeInteractive',iSubject,filenameFull) at 1201
**



** Error: The FEM tensors computation failed.
** Check the Matlab command window for additional information.
**


Plane: Matlab2016a, brainsuite2021
I just do every thing as the tutorial says

Can someone help me, thanks

If the error is really occurring at line 169, this means that the error is independent from BrainSuite, it is only related with the FEM mesh.

What you can do to help us diagnose this error:

  • First, make sure Brainstorm is up-to-date.
  • Please copy-paste all the text that is displayed in the Matlab command window, from the moment you click on the menu until the error (the actual error message is missing)
  • Post a screen capture showing the FEM mesh in a 3D figure (simple double-click on the FEM mesh)
  • Post a screen capture of the Brainstorm window, showing the FEM mesh
1 Like

when I run "compute FEM tensors" using FEM 718392V, the error occur. The FEM mesh

Both the SimNIBS mesh in TutorialFem and the brain2mesh mesh in TutorialTensors will meet such error

  • Please copy-paste all the text that is displayed in the Matlab command window, from the moment you click on the menu until the error (the actual error message is missing)
  • Post a screen capture of the Brainstorm window, showing the FEM mesh
  • Copy-paste here the output of the command ver

** Error: Line 169: ./
** Matrix dimensions must agree.
**
** Call stack:
** >process_fem_tensors.m>Compute at 169
** >process_fem_tensors.m>ComputeInteractive at 375
** >process_fem_tensors.m at 24
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@process_fem_tensors,'ComputeInteractive',iSubject,filenameFull) at 1201
**



** Error: The FEM tensors computation failed.
** Check the Matlab command window for additional information.
**


I suspect one of the three situations:

  • You have some extra Matlab function interfering with Brainstorm:
    • Edit your Matlab path: remove all the folders that are not related with the installation of Matlab itself, then restart Matlab
  • You're doing something different than what is presented in the tutorials.
  • You have a different version of Matlab or BrainSuite that causes it not to work
    • Which version of BrainSuite are you running?
    • Which version of Matlab are you running?
1 Like

thank you very much, when I update my MATLAB from R2016b to R2019b, the BUG disappear