File Exchange

## Significant wave height

version 1.0.0.0 (2.42 KB) by Gar

### Gar (view profile)

This function gets some wave heights

Updated 18 Jan 2007

This routine calculates: significant wave height, Hmax, Hrms, H1/2, H1/10, H/100, significant wave period, Taverage, T1/2, T1/10, T1/100.

0. Syntax:
Only run StaWave.m

1. Inputs:
Data of wave height and period must be in a .txt file, in which the first column has wave heights and the second column corresponds to wave periods.

2. Output :
Routine creates two files in which send next results:
Hw.txt: maximum wave height
average wave height
rms wave height
1/2 wave height
significant wave height
1/10 wave height
1/100 wave height
Pw.txt: maximum wave period
average wave period
1/2 wave period
significant wave period
1/10 wave period
1/100 wave period
4. Notes
The file datwaves.txt is the input file of this routine.

5. Referents:
Silva, R. (2005). Analisis y descripcion estadística del oleaje, SD/49. Instituto de Ingenieria, UNAM. Mexico.

Gabriel Ruiz.
Jun-2006

### Cite As

Gar (2020). Significant wave height (https://www.mathworks.com/matlabcentral/fileexchange/13695-significant-wave-height), MATLAB Central File Exchange. Retrieved .

defri sumarwan

### defri sumarwan (view profile)

I think, you should sort you "waves" from the higher to the lower value.

Venkata Sivakanth Telasula

Severin

### Severin (view profile)

I think you should review the calcul of tmax, which is the duration between the zero-crossings which define the wave of maximum height. Why it is periods(1,1) in your script (line 53)? You should use sortrows(wave) and then hmax=wave(1,end); tmax=wave(2,end);
Regards

##### MATLAB Release Compatibility
Created with R2006b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux