I tried to play with this for fun and got into a very frequent and very frustrating problem I have with MATLAB:
I was trying to do the same exercise with the series 1+1/4+1/9+…+1/n^2…
but I made the not too unlikely mistake of
den=[1:n^2]
instead of
den=[1:n].^2
ran it for 5, instantly got 3.8160, ran it for 50, instantly got 8.405, ran it for 500, instantly got 13.0064, ran it for 5000 and instantly locked up MATLAB and had to CTRL+ALT+DEL and kill the process. This happens to me all the time. I can’t be expected to always calculate in my head how much memory an operation is going to take before I hit ENTER, and even if I did I might make a mistake. There must be some way to issue a warning when the user is starting to execute something like this. Although I have no clue on how to distinguish this from a legitimate memory/cpu intensive calculation. Any ideas?
Leave a Reply
About
Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.
Bug report: “…plot the cumulative some of this series”??
Some sums sometimes approach a summit; and some summits are sometimes some ints. Of course some summits are more infinite than others.
In related news, the “spam protection” question will now be: Some of 10 + 3?
… Sounds like you’ve been thinking too hard lately; go enjoy the holiday.
I tried to play with this for fun and got into a very frequent and very frustrating problem I have with MATLAB:
I was trying to do the same exercise with the series 1+1/4+1/9+…+1/n^2…
but I made the not too unlikely mistake of
den=[1:n^2]
instead of
den=[1:n].^2
ran it for 5, instantly got 3.8160, ran it for 50, instantly got 8.405, ran it for 500, instantly got 13.0064, ran it for 5000 and instantly locked up MATLAB and had to CTRL+ALT+DEL and kill the process. This happens to me all the time. I can’t be expected to always calculate in my head how much memory an operation is going to take before I hit ENTER, and even if I did I might make a mistake. There must be some way to issue a warning when the user is starting to execute something like this. Although I have no clue on how to distinguish this from a legitimate memory/cpu intensive calculation. Any ideas?