summaryrefslogtreecommitdiff
path: root/rand_pred.m
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-11 10:25:51 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-11 10:25:51 +0200
commit24c763e80a62e4fa73d4a298083db3e3ec0887a2 (patch)
treebd0ccfa68795f8faac6189c03afe10f29d06e1fe /rand_pred.m
parent241d4a8570d5f7b766c76ca20e4d2454ba4ee4c8 (diff)
downloaddmc-24c763e80a62e4fa73d4a298083db3e3ec0887a2.tar.gz
dmc-24c763e80a62e4fa73d4a298083db3e3ec0887a2.tar.bz2
dmc-24c763e80a62e4fa73d4a298083db3e3ec0887a2.zip
mean/rand_pred: Use same function prototype as regress_pred
The number of days is implicit in the size of the given price and quantity matrices.
Diffstat (limited to 'rand_pred.m')
-rw-r--r--rand_pred.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/rand_pred.m b/rand_pred.m
index 5ed4be3..2e38e80 100644
--- a/rand_pred.m
+++ b/rand_pred.m
@@ -1,5 +1,6 @@
-function pred = rand_pred(data, times)
+function pred = rand_pred(price, data)
+ times = size(price, 1) - size(data, 1);
pred = abs(normrnd(mean(data), sqrt(var(data))));
for i = 1:(times-1)