A couple remarks for this homework solution:
- several (most!) variables are never used (T,s,t, mx,my,mr)
- explain what the input variable n is in the help, because not "any value of time n" is valid. (it can be a positive integer only!)
- add an error check for that in the code
- The help can be improved. Explain what the user may expect (a plot!).
- why not return both X and Y?
- Have you actually typed "help two_D_Rand_walk"? What you get is not very informative for the user, isn't it? Or do you want a lot of emails ;-)
Now, hold on here. I think there are some interesting points shown in this submission. Sure, it is fairly simple; but the concept can be utilized as a possible building block for an MC simulation. It is very well documented.
However, I would suggest moving the function call to the top of the m-file.
I'm not sure that "Poor" or "Needs Improvement" is the right description for this. "Needs some reason for existence" is a better description. Yes, I'm sure the author is proud of their homework. But that does not make it of any value to the rest of the world. This does nothing for anybody else but take up space and make it harder for people to find useful codes on the file exchange.
As far as the actual code goes, I've seen far worse. It has some comments. Its not a script. Its even "vectorized".
Were I to give this a rating as a homework assignment (a category which does not exist on the FEX) it might receive a decent rating. But I'm sorry, this provides only clutter on the FEX.