I don't think that will work because the shell where FSLDIR gets set is not the same shell as that of the system command. Try putting those two in the same string and then running system on that
On 08/04/2015 04:36 PM, Albrecht, Daniel S. wrote: > Hello, > > Sorry if this isn’t the right forum for the question, but not sure > where to direct it. > > I’m trying to incorporate some FSL commands into a Matlab script. I’m > using a Linux machine and running Matlab 7.11.0 (2010b). I tried to > access the FSL toolbox through Matlab using: > > setenv(‘FSLDIR’,’/autofs/cluster/pubsw/2/pubsw/Linux-2-2.3-x86_64/packages/fsl.64bit/5.0.7’) > system(‘${FSLDIR}/etc/fslconf/fsl.sh’) > > But received a “permissions denied” error. Is there an easier way to > access FSL through Matlab? > > Thanks, > > Daniel S. Albrecht, PhD > Research Fellow in Radiology > Martinos Center for Biomedical Imaging > > Massachusetts General Hospital > 149 Thirteenth Street, Room 2301 > Charlestown, MA 02129 > Phone: (617) 643-6748 > Fax: (617) 726-7422 > dsalbre...@mgh.harvard.edu > <https://owa.partners.org/cvpn/aHR0cHM6Ly9wcm94eS1vd2EucGFydG5lcnMub3Jn/owa/redir.aspx?C=8A9OJCUaPkOLxUmmjc0_cF-xdjAP2NEI4aEbq2JpVjitXhs_QYjcIRXVbcEtTXWjym0XzqsaDNI.&URL=mailto%3amarco%40nmr.mgh.harvard.edu> > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Douglas N. Greve, Ph.D. MGH-NMR Center gr...@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.