Using MVAPACK

From Powers Wiki
Revision as of 22:54, 18 January 2022 by Mjeppesen (talk | contribs) (Created page with "category:MVAPACK =General Notes= MVAPACK operates in Octave - therefore it uses native octave/MATLAB syntax. A typical script would encase multiple lines of code. Here...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


General Notes

MVAPACK operates in Octave - therefore it uses native octave/MATLAB syntax.

A typical script would encase multiple lines of code.

Here are a few lines you could execute to ensure MVAPACK is installed correctly.

$octave
octave 1:>pkg list
->This will display all current octave packages. MVAPACK should be listed and the version should match the version listed in the manual.
octave 2:>x = [1:100];
octave 3:>y = sin(x);
octave 4:>plot(x,y);
->This will display a sin wave plot. If this is plotted in the terminal you need to check your X11 forwarding. This should plot to a new window.

Sample MVAPACK Script

Once you are in an appropriate octave environment as proven above. The following can be executed to load in data from a file.

octave 1:>F.dirs = glob('/location/of/your/data');
Note: This function will take everything from this file location. Make sure there is only data there.
octave 2:>[F.data, F.parms, F.t] = loadnmr(F.dirs);
octave 3:>F.data = zerofill(F.data, F.parms);
octave 4:>[S.data, S.ppm] = nmrft(F.data, F.parms);
octave 5:>[S.data, S.phc0, S.phc1] = autophase(S.data, F.parms);
octave 6:>X.data = realnmr(S.data, F.parms);
octave 7:>X.ppm = S.ppm;
octave 8:>pcaMdl = pca(X.data);
octave 9:>rqplot(pcaMdl);

This example guides you through a simplified path to examine NMR data. This is not a suggested script for regular use, but rather an example to try and see how data is handled in the MVAPACK software package.

A complete script can be accessed through MVAPACK online for specific purpose or Here.