diff --git a/MATLAB/src/plot_predictions.m b/MATLAB/src/plot_predictions.m index aab00b5..1dd699c 100644 --- a/MATLAB/src/plot_predictions.m +++ b/MATLAB/src/plot_predictions.m @@ -66,7 +66,7 @@ function plot_predictions(y_pred, y_test, varargin) fill([t_pred(non_inf_idx), flip(t_pred(non_inf_idx))], [y_min(non_inf_idx), flip(min(min(y_pred_min, y_test))*ones(1, sum(non_inf_idx)))], 'r', 'linestyle', 'none', 'FaceAlpha', 0.35, 'DisplayName', 'constraints'); end if ~isempty(y_max) - non_inf_idx = ~isinf(y_min); + non_inf_idx = ~isinf(y_max); fill([t_pred(non_inf_idx), flip(t_pred(non_inf_idx))], [y_max(non_inf_idx), flip(max(max(y_pred_max, y_test))*ones(1, sum(non_inf_idx)))], 'r', 'linestyle', 'none', 'FaceAlpha', 0.35, 'DisplayName', 'constraints'); end