From af56b8ad70df4071318f2cf2259a299df25efd5a Mon Sep 17 00:00:00 2001 From: Andrew Simms Date: Tue, 31 Dec 2024 16:01:58 -0700 Subject: [PATCH] Style: Remove trailing whitespace --- mhkit/wave/resource/environmental_contours.m | 61 ++++++++++---------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/mhkit/wave/resource/environmental_contours.m b/mhkit/wave/resource/environmental_contours.m index 209fc1d7..779c3118 100644 --- a/mhkit/wave/resource/environmental_contours.m +++ b/mhkit/wave/resource/environmental_contours.m @@ -1,49 +1,49 @@ function environmental_contour=environmental_contours(x1, x2, dt, period, method, options) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Calculates environmental contours of extreme sea -% states using the improved joint probability distributions -% with the inverse first-order reliability method (IFORM) -% probability for the desired return period (period). Given the +% Calculates environmental contours of extreme sea +% states using the improved joint probability distributions +% with the inverse first-order reliability method (IFORM) +% probability for the desired return period (period). Given the % period of interest a circle of iso-probability is created in the -% in the PCA joint probability (x1, x2) reference frame. -% Using the joint probability value the CDF of the marginal -% distribution is used to find the quantile of each component. +% in the PCA joint probability (x1, x2) reference frame. +% Using the joint probability value the CDF of the marginal +% distribution is used to find the quantile of each component. % Finally, using the improved PCA methodology -% the component 2 contour lines are calculated from component 1 using -% the relationships defined in Exkert-Gallup et. al. 2016. -% -% Eckert-Gallup, A. C., Sallaberry, C. J., Dallman, A. R., & -% Neary, V. S. (2016). Application of principal component -% analysis (PCA) and improved joint probability distributions to -% the inverse first-order reliability method (I-FORM) for predicting -% extreme sea states. Ocean Engineering, 112, 307-319. -% +% the component 2 contour lines are calculated from component 1 using +% the relationships defined in Exkert-Gallup et. al. 2016. +% +% Eckert-Gallup, A. C., Sallaberry, C. J., Dallman, A. R., & +% Neary, V. S. (2016). Application of principal component +% analysis (PCA) and improved joint probability distributions to +% the inverse first-order reliability method (I-FORM) for predicting +% extreme sea states. Ocean Engineering, 112, 307-319. +% % Parameters % ------------ % x1 : vector % component 1 data % % x2 : vector -% component 2 data +% component 2 data % % dt : double % x1 and x2 sample rate (seconds) -% +% % period : scalar or vector % Desired return period (years) for calculation of environmental % contour, can be a scalar or a vector. -% +% % PCA: Structure (optional) -% principal component analysis dictionary from previous function -% call. When supplied the function will skip the PCA calculation -% for the passe x1, and x2. +% principal component analysis dictionary from previous function +% call. When supplied the function will skip the PCA calculation +% for the passe x1, and x2. % to call: environmental_contour(x1,x2,dt,period,"PCA",PCA) -% +% % bin_size : double (optional) -% Data points in each bin +% Data points in each bin % to call: environmental_contour(x1,x2,dt,period,"bin_size",bin_size) -% +% % nb_steps : int (optional) % Discretization of the circle in the normal space used for % IFORM calculation. @@ -52,17 +52,17 @@ % return_PCA: boolean % Default False, if True will retun the PCA dictionary % to call: environmental_contour(x1,x2,dt,period,"return_PCA",return_PCA) -% -% +% +% % Returns % --------- -% environmental_contour: Structure +% environmental_contour: Structure % Structure with fields contour1, contour2, and optionally PCA % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -arguments +arguments x1 x2 dt @@ -83,7 +83,7 @@ if isscalar(period) period_py = period; elseif isvector(period) - period_py = py.numpy.array(period); + period_py = py.numpy.array(period); else ME = MException('MATLAB:environmental_contour','period must be a vector or scalar'); throw(ME); @@ -106,4 +106,3 @@ environmental_contour.fit = struct(data_struct.(varfit)); end -