Use of MRtrix3 in MATLAB

Hi James,

Running MRtrix commands from Matlab can be a bit of a headache – see this old thread outlining some of the issues.

In your case however, you’re trying to run this on a Windows system, presumably using the Windows-native version of Matlab to invoke the MSYS2 version of MRtrix executables. That’s going to be even trickier… There’s a whole page on the MSYS2 wiki on how to do it, if you really want to give it a shot. From what I can gather, something like:

system ('C:\msys64\usr\bin\env MSYSTEM=MINGW64 /usr/bin/bash -li mrview')

might do the trick… (though you may need to edit the location of the env command for your system, depending on where you installed MSYS2).

Good luck,
Donald.