class_docstr: Interface that runs matlab code
  
  >>> import nipype.interfaces.matlab as matlab
  >>> mlab = matlab.MatlabCommand(mfile=False)  # don't write script file
  >>> mlab.inputs.script = "which('who')"
  >>> out = mlab.run()  # doctest: +SKIP
class_docstr_tok: ["Interface","that","runs","matlab","code",">",">",">","import","nipype.interfaces.matlab","as","matlab",">",">",">","mlab","=","matlab.MatlabCommand","(","mfile=False",")","#","do","n't","write","script","file",">",">",">","mlab.inputs.script","=","``","which","(","'who","'",")","''",">",">",">","out","=","mlab.run","(",")","#","doctest",":","+SKIP"]
docstr: initializes interface to matlab
  (default 'matlab -nodesktop -nosplash')
docstr_tok: ["initializes","interface","to","matlab","(","default","'matlab","-nodesktop","-nosplash","'",")"]
code: def __init__(self, matlab_cmd=None, **inputs):
      """initializes interface to matlab
      (default 'matlab -nodesktop -nosplash')
      """
      super().__init__(**inputs)
      if matlab_cmd and isdefined(matlab_cmd):
          self._cmd = matlab_cmd
      elif self._default_matlab_cmd:
          self._cmd = self._default_matlab_cmd
  
      if self._default_mfile and not isdefined(self.inputs.mfile):
          self.inputs.mfile = self._default_mfile
  
      if self._default_paths and not isdefined(self.inputs.paths):
          self.inputs.paths = self._default_paths
  
      if not isdefined(
          self.inputs.single_comp_thread
      ) and not isdefined(self.inputs.uses_mcr):
          if config.getboolean("execution", "single_thread_matlab"):
              self.inputs.single_comp_thread = True
      # For matlab commands force all output to be returned since matlab
      # does not have a clean way of notifying an error
      self.terminal_output = "allatonce"
  
file_path: nipype/nipype/interfaces/matlab.py
imports: import os
  from ..None import config
  from .base import CommandLineInputSpec, InputMultiPath, isdefined, CommandLine, traits, File, Directory
label_desc: Use image node_id 1 to create a new MatlabCommand object from inherited base classes: CommandLine with example: obj = MatlabCommand(matlab_cmd)