NOTE: These routines still have not been tested enough yet and can contain minor bugs. Please report any bugs that you find!
It is also possible to use the processing facilities of matNMR in user-defined scripts. A number, but not all, processing
actions have been created into separate functions that do not require the matNMR GUI to be open. They are, separated by
mode:
Mode-independent | 1D Processing | 2D Processing |
---|---|---|
|
|
|
The names should be self-explanatory in terms of what the functions do. The syntax for each function can be obtained by typing help "Name Function" in the Matlab command window. This should provide ample information. All the above-mentioned routines operate on matrices only and not on (matNMR) structures! In most cases, processing of hypercomplex matrices is not supported in the sense that both matrices cannot be entered at the same time, but must be called sequentially from the user-defined script.
It is possible to convert macros to scripts directly from the GUI. This currently only works for 1D actions but this will soon be extended to 2D actions as well.
Note that although most things can be done this way, baseline correction is not (yet) supported as this requires input of peak positions in matNMR. Furthermore, no spectral information is maintained by these functions.
Finally, an additional way of using matNMR in user-defined scripts is to record processing and/or plotting macro's, which can then be called by the function matNMRRunMacro. Again, the syntax to this function can be called by typing help matNMRRunMacro in the Matlab command window. This function does require matNMR windows to be open but doesn't rely on user input whilst processing, i.e. even though changes are made to the matNMR windows they may be hidden from view. This function can be used to either process a spectrum using a macro, OR to execute a plotting macro on the current window.
Here's an example of how one could use matNMRRunMacro in a script: