MHKiT-MATLAB
MHKiT-MATLAB copied to clipboard
jonswap_spectrum bug
Hello,
I found a bug in the jonswap_spectrum code for MHKiT Matlab. The elseif nargin == 4 line has the gamma value placed into the Hs and gamma part of the function. This causes incorrect formulation of the Jonswap function. The correct code is below as the Hs needs to be in the Hs spot of the python function. The gamma value should only change the peakiness of the spectrum, this can be easily seen when plotting the spectrum.
elseif nargin == 4
S_py=py.mhkit.wave.resource.jonswap_spectrum(frequency,Tp,Hs,pyargs('gamma',varargin{1}));
Cheers, Courtney