I can’t run that example because I do not know what any of the variables are. Please give a full example otherwise we can’t help. One thing I do see is that mu=mean(r[:,1:end]
had a syntax error because it’s missing a )
. Since you didn’t describe what your error is, I assume that might be it?