Rank: 6653 based on 10 downloads (last 30 days) and 1 file submitted
photo

Hairui

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Hairui
Updated   File Tags Downloads
(last 30 days)
Comments Rating
08 Mar 2012 Assign the same values to many output variables MANY takes in the variable x and assign it to all the output variables. Author: Hairui miscellaneous 10 2
Comments and Ratings by Hairui
Updated File Comments Rating
27 Jan 2009 Plot Some Paths This application allows you to generate and visualize some random paths Author: Rodolphe Sitter

Your project is very impressive. I really love the idea of combining GUI and m-code to visualize the stochastic processes.

Meanwhile, I think the SDE class in Matlab might be useful if you want to make your project more flexible. I don't know whether this can help, but here's my code of generating random paths using Vasicek:

ntrials = 200;
Steps = 1000;
kappa = 2;
theta = 1;
sigma = 0.4;
X0 = 1;
s = sdeddo(drift(kappa, theta), diffusion(0, sigma), 'StartTime', 0, 'StartState', X0);
p = s.simByEuler(Steps, 'DeltaTime', 1e-4, 'NTRIALS', ntrials);
plot(reshape(p, [Steps + 1, ntrials]));

Kind regards,

Hairui

Comments and Ratings on Hairui 's Files View all
Updated File Comment by Comments Rating
09 Mar 2012 Assign the same values to many output variables MANY takes in the variable x and assign it to all the output variables. Author: Hairui Jan Simon

I do not assume that PARFOR is helpful here. Is it? This looks simpler and is faster:
varargout = cell(nargout, 1); varargout(:) = {x};
Anyhow, I'd stay at DEAL.

08 Mar 2012 Assign the same values to many output variables MANY takes in the variable x and assign it to all the output variables. Author: Hairui Eric

Of course

[x1, x2, x3, x4, x5] = deal(8);

using Matlab's built-in deal() function does the same thing.

Contact us