MATLAB Ridiculously long computations on Maple/Matlab/Mathematica

  • Thread starter Thread starter Simfish
  • Start date Start date
AI Thread Summary
The discussion revolves around the challenges of using computational software like Maple, Mathematica, and Matlab for complex calculations, particularly the need to stop lengthy computations without terminating the program. Users seek methods to estimate calculation time, with suggestions including using the tic and toc functions in Matlab or measuring progress through partial iterations. The conversation also highlights the convenience of the TI-83 graphing calculator, particularly its table feature for easily visualizing multiple inputs and outputs on one screen. While some users find the TI-83 suitable for simpler tasks, others prefer Matlab for more complex calculations, noting a learning curve associated with advanced software. There is a consensus that each tool has its strengths, with the TI-83 being favored for straightforward tasks and Matlab or C/C++ for more intensive computational needs.
Simfish
Gold Member
Messages
811
Reaction score
2
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)?
 
Physics news on Phys.org
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).
 
Simfishy said:
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).

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?
 
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.
 
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?

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)
 
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.
 
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:
Simfishy said:
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)

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.
 

Similar threads

Replies
3
Views
3K
Replies
6
Views
2K
Replies
8
Views
4K
Replies
4
Views
12K
Replies
2
Views
2K
Back
Top