summaryrefslogtreecommitdiff
path: root/rand_pred.m
diff options
context:
space:
mode:
Diffstat (limited to 'rand_pred.m')
-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