You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:download:`Download the source code of this example <matlab_example1.py>`.
64
17
65
18
Example 2
66
19
+++++++++
67
20
68
-
By subclassing **MatlabCommand** for your main class, and **MatlabInputSpec** for your input and output spec, you gain access to some useful MATLAB hooks
21
+
By subclassing :class:`nipype.interfaces.matlab.MatlabCommand` for your main class, and :class:`nipype.interfaces.matlab.MatlabInputSpec` for your input spec, you gain access to some useful MATLAB hooks
69
22
70
-
.. testcode::
23
+
.. literalinclude:: matlab_example2.py
71
24
72
-
from nipype.interfaces.base import traits
73
-
from nipype.interfaces.matlab import MatlabCommand, MatlabInputSpec
74
-
75
-
76
-
class HelloWorldInputSpec(MatlabInputSpec):
77
-
name = traits.Str(mandatory=True,
78
-
desc='Name of person to say hello to')
79
-
80
-
81
-
class HelloWorldOutputSpec(MatlabInputSpec):
82
-
matlab_output = traits.Str()
83
-
84
-
85
-
class HelloWorld(MatlabCommand):
86
-
"""Basic Hello World that displays Hello <name> in MATLAB
87
-
88
-
Returns
89
-
-------
90
-
91
-
matlab_output : capture of matlab output which may be
0 commit comments