random walk in matlab without the econometrics toolbox
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I am looking for a way to create a random walk in matlab without having the financial toolbox
0 个评论
采纳的回答
Shashank Prasanna
2013-5-2
6 个评论
Cedric
2013-5-2
n = 200 ; m = 20 ;
figure ; hold on ;
for k = 1 : m
plot(cumsum((rand(1, n) > 0.5) - 0.5), 'Color', rand(1, 3)) ;
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!