Please don't feel intimidated by my status as a Professor. That's not my intent. I'm just trying to point out a few things that can improve your code.
Including comments in Italian is fine - it's just that even in Italian the comments are insufficient. See for example "help chol"; it gives you a short description of what the function does, and tells you what the inputs and outputs are.
Yes, I'm sure the code works in MATLAB 6.0, but the "break" statements are a problem. They should be replaced with "return". Also, when you detect an error you should call "error", not return an error "iflag", and particular you should not return without assigning all of your output arguments. That does cause MATLAB 7.x to generate a true error.
The AMD vs Pentium question is not the issue. I do not have an AMD processor. It's a MATLAB 6.x vs 7.x issue; the former is more forgiving about these kinds of errors, it seems.