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"]
code: def _run_interface(self, runtime):
      self.terminal_output = "allatonce"
      runtime = super()._run_interface(runtime)
      try:
          # Matlab can leave the terminal in a barbbled state
          os.system("stty sane")
      except:
          # We might be on a system where stty doesn't exist
          pass
      if "MATLAB code threw an exception" in runtime.stderr:
          self.raise_exception(runtime)
      return runtime
  
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 5 for calling the MatlabCommand obj's underlying member method code with example usage: obj._run_interface(runtime) and returns: runtime