From 071f84774579de3b58d5c886576cbe5757bc83ba Mon Sep 17 00:00:00 2001 From: Stephen Montgomery-Smith Date: Mon, 14 May 2018 23:28:48 +0000 Subject: - Add patch to unbreak. - Bump portrevision (because of update of octave to 4.4.0). Obtained from: https://sourceforge.net/p/octave/fuzzy-logic-toolkit/ci/default/tree/ --- .../files/patch-inst_defuzz.m | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 math/octave-forge-fuzzy-logic-toolkit/files/patch-inst_defuzz.m (limited to 'math/octave-forge-fuzzy-logic-toolkit/files/patch-inst_defuzz.m') diff --git a/math/octave-forge-fuzzy-logic-toolkit/files/patch-inst_defuzz.m b/math/octave-forge-fuzzy-logic-toolkit/files/patch-inst_defuzz.m new file mode 100644 index 000000000000..1c05c842a56d --- /dev/null +++ b/math/octave-forge-fuzzy-logic-toolkit/files/patch-inst_defuzz.m @@ -0,0 +1,62 @@ +--- inst/defuzz.m.orig 2014-07-02 00:11:06 UTC ++++ inst/defuzz.m +@@ -1,4 +1,4 @@ +-## Copyright (C) 2011-2014 L. Markowsky ++## Copyright (C) 2011-2018 L. Markowsky + ## + ## This file is part of the fuzzy-logic-toolkit. + ## +@@ -162,7 +162,16 @@ endfunction + function crisp_x = mom (x, y) + + max_y = max (y); +- y_val = @(y_val) if (y_val == max_y) 1 else 0 endif; ++ ++ function y_val = calc_yval(y_val) ++ if (y_val == max_y) ++ y_val = 1; ++ else ++ y_val = 0; ++ endif ++ endfunction ++ ++ y_val = @(y_val) calc_yval(y_val); + max_y_locations = arrayfun (y_val, y); + crisp_x = sum (x .* max_y_locations) / sum (max_y_locations); + +@@ -185,7 +194,16 @@ endfunction + function crisp_x = som (x, y) + + max_y = max (y); +- y_val = @(y_val) if (y_val == max_y) 1 else (NaN) endif; ++ ++ function y_val = calc_yval(y_val) ++ if (y_val == max_y) ++ y_val = 1; ++ else ++ y_val = (NaN); ++ endif ++ endfunction ++ ++ y_val = @(y_val) calc_yval(y_val); + max_y_locations = arrayfun (y_val, y); + crisp_x = min (x .* max_y_locations); + +@@ -207,7 +225,16 @@ endfunction + function crisp_x = lom (x, y) + + max_y = max (y); +- y_val = @(y_val) if (y_val == max_y) 1 else (NaN) endif; ++ ++ function y_val = calc_yval(y_val) ++ if (y_val == max_y) ++ y_val = 1; ++ else ++ y_val = (NaN); ++ endif ++ endfunction ++ ++ y_val = @(y_val) calc_yval(y_val); + max_y_locations = arrayfun (y_val, y); + crisp_x = max (x .* max_y_locations); + -- cgit v1.2.3