Skip to content

Commit 0c135a4

Browse files
committed
bug fix for older versions of matlab
1 parent 2fd5cd2 commit 0c135a4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

mhkit/acoustics/analysis/apply_calibration.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@
2020

2121
arguments (Input)
2222
spsd struct
23-
sensitivity_curve {mustBeMatrix}
23+
sensitivity_curve
2424
fill_value {mustBeNumeric}
2525
end
2626

2727
arguments (Output)
2828
spsd_cal struct
2929
end
3030

31+
% check if sensitivity_curve is a matrix
32+
if ~ismatrix(sensitivity_curve) || size(sensitivity_curve,2) ~= 2
33+
error('sensitivity_curve must be a matrix with two columns!')
34+
end
35+
3136
% check if 'freq' exists in spsd
3237
if ~isfield(spsd, "freq")
3338
error('"freq" is missing in spsd!')

0 commit comments

Comments
 (0)