Why isn't my system command running? In Linux.

I am trying to run an external suite of functions called FEAT. This is from a software called FSL.
The packages website states that in order for Matlab to be aware of FSL, a Matlab startup.m file needs to be created with the following commands, in ~/Documents/MATLAB:
fsldir = '/usr/local/fsl/';
fsldirmpath = sprintf('%s/etc/matlab',fsldir);
setenv('FSLDIR', fsldir);
setenv('FSLOUTPUTTYPE', 'NIFTI_GZ');
path(path, fsldirmpath);
clear fsldir fsldirmpath;
the website is here: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Linux#FslInstallation.2FFslMatlabConfiguration.Using_FSL_from_MATLAB (see bottom of page).
I have done this, have started Matlab from the command line, and ran my script with the command:
cmd = '/usr/local/fsl/bin/feat /path/to/input/file/config_file.fsf'
[status, ~] = system(cmd);
but when I run this, there is no progress with the command. If I pause or cancel out of the script, The script is always stuck on line 67 of dos:
[varargout{1:nargout}] = matlab.system.internal.executeCommand(varargin{:});
Anyone have any ideas on how I can resolve these issues? Help would be appreciated.
P.S. running R2021b.

5 comentarios

Jan
Jan el 11 de Mzo. de 2022
To be sure: "/path/to/input/file" is replaced by the real path, isn't it?
What happens, if you run this command from a command shell?
David Haydock
David Haydock el 11 de Mzo. de 2022
Yes, I replaced my own path with this as a standin as to not share my filing structure on a public forum.
I can run the command from the shell but it requires sudo before it. I have run the command in Matlab with sudo included but I have the same issue. Would this be the source of the issue?
Jan
Jan el 11 de Mzo. de 2022
Are you sure that FEAT is installed correctly? The need of superuser privileges sounds strange.
David Haydock
David Haydock el 11 de Mzo. de 2022
Hi Jan.
I have reinstalled FSL at the root and this seems to have resolved the issue. Turns out that the issue was on the FSL side and not the MATLAB side.
Apologies for this, when I posted this question I suspected the issue was on the MATLAB side. I will close the question off.
Thank you for your help on this, it is appreciated.
Jan
Jan el 11 de Mzo. de 2022
Do not close the question, but accept your answer. Others might have the same problem and search in the forum.

Iniciar sesión para comentar.

Respuestas (1)

David Haydock
David Haydock el 11 de Mzo. de 2022

0 votos

FSL was installed at the local level and worked when it was reinstalled at the root.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Preguntada:

el 11 de Mzo. de 2022

Comentada:

Jan
el 11 de Mzo. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by