Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ridiculously long computations on Maple/Matlab/Mathematica

  1. Jul 29, 2007 #1

    Simfish

    User Avatar
    Gold Member

    So I occasionally enter a formula that would literally take years to calculate with Maple/Mathematica/Matlab. The question is - is there a way to prematurely stop the calculation without having to kill the program? (and is there a way to pre-calculate the amount of time needed to solve that particular equation)?
     
  2. jcsd
  3. Jul 29, 2007 #2

    Simfish

    User Avatar
    Gold Member

    And on a side note - do you find it more convenient to use a traditional Ti-83 graphing calculator at times? I really like the "table" option of the Ti-83 (or the "move the cursor around the graph") option of the Ti-83, and I haven't found a good substitute for that on Maple/Mathematica/Matlab (though I'm naive wrt all three).
     
  4. Jul 29, 2007 #3
    Kind of a stupid answer... but, it just depends on what you are doing.

    Sometimes it's easier to use Matlab, sometimes maple, sometimes C, sometimes a TI-calculator, and many times Excel works very nice. I have zero experience with Mathematica; I hear it is nice, but with a strong learning curve.

    What are you typically doing when you use the "table" feature on the calculator? Why do you want to substitute it in the first place?
     
  5. Jul 29, 2007 #4
    CTRL-C works to stop a running program in Matlab. If you want to estimate the processing time for something you're doing, you can use tic and toc, assuming you're doing something that iterates over some basic calculation many times. There also ways to improve processing speed, such as by pre-allocating arrays.
     
  6. Jul 29, 2007 #5

    Simfish

    User Avatar
    Gold Member

    The table feature of the calculator is useful since you can easily graph several outputs and several inputs, all on the same screen (and you can easily move up or down). I wonder if there are any quick and easy ways to substitute this feature on maple/mathematica/matlab (perhaps since those programs might allow you to put more features along with the table)
     
  7. Jul 30, 2007 #6
    If you know how to plot data in Matlab, what you're describing is quite easy - I do it almost every day. There's a bit of a learning curve, but it's not too bad.
     
  8. Aug 1, 2007 #7
    In many instances you can estimate how long the calculation will take by finding out how long it takes to go through 2% of the calculation and then multiplying that by 50. This assumes, though, that all parts of the calculation will take about the same amount of time. You might also run the program as a script, let it run for a minute, kill it with ctrl-c, and then check the values of a loop index variable to see how far along the script went.

    Generally, my TI-83 is more convenient for simple calculations and simple plots. I tend not to use the table feature very much though. For more complex calculations and the ability to push numbers around like a glob of clay, I use Matlab. If I need serious horsepower, then I'll use C/C++.
     
    Last edited: Aug 1, 2007
  9. Aug 1, 2007 #8
    You be able to write a script or a function that can handle the functionality, although, it is possible that a TI-83 does the job best.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Ridiculously long computations on Maple/Matlab/Mathematica
Loading...