From 9340c9808fbea07e1d8a959699dff9bf0df06bd9 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 11 May 2012 16:26:31 +0200 Subject: rand_pred: Pred needs to have 570 columns, not 1 --- rand_pred.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rand_pred.m b/rand_pred.m index 2bca8b6..cb4123f 100644 --- a/rand_pred.m +++ b/rand_pred.m @@ -1,9 +1,9 @@ function pred = rand_pred(price, data) times = size(price, 1) - size(data, 1); - pred = zeros(times, 1); + pred = zeros(times, size(price, 2)); for i = 1:times - pred(i) = abs(normrnd(mean(data), sqrt(var(data)))); + pred(i,:) = abs(normrnd(mean(data), sqrt(var(data)))); end end -- cgit