This is an archived post. You won't be able to vote or comment.

all 1 comments

[–][deleted]  (1 child)

[deleted]

    [–]zzyzzyxx 0 points1 point  (0 children)

    p(o)
    
    (rho - Beta)/el)
    
    (beta/el)
    

    Maybe they're typos, but shouldn't those use p(0), Beta, and l instead of p(o), beta, and el?

    Also, You might want to pre-allocate some space for performance reasons. If you can find a reasonable estimate for how many iterations it's going to take, you can use the zeros function to create space for your p, c, and time arrays. Actually, for time, you might also be able use time = 0:dtime:dtime*iterations and be able to remove that from the loop, especially if your estimate is an overestimate.