From 1e346b57fc02484d555d89e870d68b7459dbc6e7 Mon Sep 17 00:00:00 2001 From: Robert Lefringhausen Date: Tue, 18 Jun 2024 08:48:33 +0200 Subject: [PATCH] Fixed minor bug in the function plot_predictions. --- MATLAB/src/plot_predictions.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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