random walk in matlab without the econometrics toolbox

4 vues (au cours des 30 derniers jours)
Locks
Locks le 2 Mai 2013
Hi,
I am looking for a way to create a random walk in matlab without having the financial toolbox

Réponse acceptée

Shashank Prasanna
Shashank Prasanna le 2 Mai 2013
  6 commentaires
Cedric
Cedric le 2 Mai 2013
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
Locks
Locks le 2 Mai 2013
I will try that, thank you very much for the support

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Random Number Generation dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by