summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-11 16:26:31 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-11 16:29:59 +0200
commit9340c9808fbea07e1d8a959699dff9bf0df06bd9 (patch)
treecd4db6c0c1cc9b09b350141614783b2f605a6257
parent79fc6aa08cbecda91da1920cfadb9d24eacd2b1b (diff)
downloaddmc-9340c9808fbea07e1d8a959699dff9bf0df06bd9.tar.gz
dmc-9340c9808fbea07e1d8a959699dff9bf0df06bd9.tar.bz2
dmc-9340c9808fbea07e1d8a959699dff9bf0df06bd9.zip
rand_pred: Pred needs to have 570 columns, not 1
-rw-r--r--rand_pred.m4
1 files 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