I have a problem with matlab. I need to sum math serie 1/x from 1 to 1E10. I have some code in Matlab which contains loop - first loop step is ok very fast), but on second step in loop it slows down and Matlab is almost freezed, so I cannot calculate this in appropriate time.
Can you help me with this?
For smaller range it works OK (for example 1E06), but I need to calculate for the whole range. I have tried to separate to smaller range, but there is still loop and matlab is very slowed.
It looks like a problem with matlab and for loop, which slows down. After first loop step the RAM is full but for the second loop step the RAM is still full so it slows down. I don′t know why the Matlab does not free the RAM.
Thank you for any help!
Vladimir
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…