# Getting Started (MATLAB Version)¶

In order to use MATLAB version of OCEANLYZ toolbox, first, one of the MATLAB or GNU Octave programming language along with required packages should be installed (Refer to required packages for MATLAB/GNU Octave).

## Installation¶

To use MATLAB version of OCEANLYZ toolbox:

One way to access OCEANLYZ is to copy OCEANLYZ files and its sub-folders in your desire working directory and then use it there. Another option is to add OCEANLYZ folder to MATLAB path. By doing that, you always have access to OCEANLYZ from any working directory. You need to do this only once. For example, if OCEANLYZ files are in “C:\oceanlyz” folder then it can be added to path as:

OceanlyzPath = genpath('C:\oceanlyz'); %Generating path for OCEANLYZ folder and its sub-folders


To remove OCEANLYZ from the path use:

OceanlyzPath = genpath('C:\oceanlyz'); %Generating path for OCEANLYZ folder and its sub-folders
rmpath(OceanlyzPath); %Remove OCEANLYZ folder from path
%restoredefaultpath; %Restore path to factory-installed state


## Operating System¶

This code can be run on Windows, Mac and Linux. However, make sure any given path is compatible with a running operating system. In particular, “" is used in Windows path, while “/” is used in Mac or Linux path. For example, if a path is “C:" on Windows machine, it would be “C:/” on Mac or Linux.

## Required Programing Language¶

The MATLAB version of this toolbox can be run by using MATLAB (https://www.mathworks.com) or GNU Octave (https://www.gnu.org/software/octave).

## Required Package for MATLAB¶

MATLAB users need to install MATLAB Signal Processing Toolbox (https://www.mathworks.com/products/signal.html) for running the OCEANLYZ spectral analysis. It gives OCEANLYZ access to MATLAB Welch’s power spectral density calculation. However, MATLAB Signal Processing Toolbox it is not required for zero-crossing analysis.

## Required Package for GNU Octave¶

GNU Octave users need to install/load GNU Octave Signal package (https://octave.sourceforge.io/signal/index.html) for running the OCEANLYZ spectral analysis. It gives OCEANLYZ access to GNU Octave Welch’s power spectral density calculation. However, GNU Octave Signal package it is not required for zero-crossing analysis.

GNU Octave comes with Signal package but it needs to loaded every time GNU Octave starts. The Signal package can be loaded inside GNU Octave by using a following command in a command window (This should be done every time GNU Octave is opened):

>> pkg load signal


If GNU Octave Signal Package is not already installed, it should be first installed from Octave Forge (https://octave.sourceforge.io), and then get loaded by using the following commands in a command window:

>> pkg install -forge signal