summaryrefslogtreecommitdiff
path: root/rand_pred.m
diff options
context:
space:
mode:
Diffstat (limited to 'rand_pred.m')
-rw-r--r--rand_pred.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/rand_pred.m b/rand_pred.m
new file mode 100644
index 0000000..5ed4be3
--- /dev/null
+++ b/rand_pred.m
@@ -0,0 +1,8 @@
+function pred = rand_pred(data, times)
+
+ pred = abs(normrnd(mean(data), sqrt(var(data))));
+
+ for i = 1:(times-1)
+ pred = [ pred; abs(normrnd(mean(data), sqrt(var(data))))];
+ end
+end