summaryrefslogtreecommitdiff
path: root/opt_pred.m
diff options
context:
space:
mode:
Diffstat (limited to 'opt_pred.m')
-rw-r--r--opt_pred.m11
1 files changed, 2 insertions, 9 deletions
diff --git a/opt_pred.m b/opt_pred.m
index 458479e..6204c29 100644
--- a/opt_pred.m
+++ b/opt_pred.m
@@ -1,13 +1,6 @@
-function pred = opt_pred(real_data, pred_list)
+function pred = opt_pred(idx, pred_list)
- err_list = zeros(size(pred_list, 2), size(real_data, 2));
-
- for i = 1:size(pred_list, 2)
- err_list(i,:) = sum(abs(real_data - pred_list{i}));
- end
-
- [min_err, idx] = min(err_list);
- pred = zeros(size(real_data));
+ pred = zeros(size(pred_list{1}));
for i = 1:size(idx, 2)
pred(:,i) = pred_list{idx(i)}(:,i);