Ridiculously long computations on Maple/Matlab/Mathematica

  • MATLAB
  • Thread starter Simfish
  • Start date
In summary: If you're just looking for a simple table of values, you could also use Excel.In summary, the conversation discusses the use of various tools such as Maple, Mathematica, Matlab, and traditional Ti-83 graphing calculator for calculations and graphing. The question is raised about stopping a lengthy calculation and estimating processing time in these programs. The use of the "table" feature on a calculator is also discussed and the possibility of substituting it in Maple, Mathematica, or Matlab is explored. The speaker also shares their personal preference for different tools depending on the complexity of the calculation.
  • #1
Simfish
Gold Member
823
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
  • #2
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).
 
  • #3
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?
 
  • #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.
 
  • #5
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)
 
  • #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.
 
  • #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:
  • #8
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.
 

FAQ: Ridiculously long computations on Maple/Matlab/Mathematica

1. Why do some computations on Maple/Matlab/Mathematica take so long?

There are several reasons why computations on Maple, Matlab, or Mathematica may take a long time. One possible reason is that the problem being solved is computationally complex, meaning it requires a large number of calculations and operations. Another reason could be that the code written for the computation is not optimized or efficient, leading to longer processing times. Additionally, the hardware and software specifications of the computer being used can also affect the speed of computations.

2. Can I speed up the computation process on Maple/Matlab/Mathematica?

Yes, there are several ways to potentially speed up computations on Maple, Matlab, or Mathematica. One way is to optimize the code being used by simplifying expressions, reducing unnecessary loops, and utilizing built-in functions. Another way is to use parallel computing techniques, which distribute the workload among multiple processors or computers. It is also important to ensure that the computer being used has sufficient memory and processing power to handle the computation.

3. How can I estimate the amount of time a computation on Maple/Matlab/Mathematica will take?

It can be difficult to accurately estimate the amount of time a computation on Maple, Matlab, or Mathematica will take, as it depends on various factors such as the complexity of the problem, the efficiency of the code, and the computer's specifications. However, some software programs have built-in tools or functions that can provide an estimate of the processing time for a specific computation. It may also be helpful to run smaller test cases to get a rough idea of the processing time before attempting the full computation.

4. Is it normal for a computation on Maple/Matlab/Mathematica to take a long time?

Yes, depending on the problem being solved, it is normal for computations on Maple, Matlab, or Mathematica to take a long time. As these software programs are used for complex mathematical and scientific calculations, some computations may naturally require a significant amount of time to complete. However, if a computation is taking an unusually long time or appears to be stuck, it may be worth checking for any errors or inefficiencies in the code.

5. Can I speed up computations on Maple/Matlab/Mathematica by upgrading my computer?

Upgrading your computer's hardware, such as increasing the memory or processor speed, may help speed up computations on Maple, Matlab, or Mathematica to some extent. However, as mentioned earlier, the efficiency of the code and the complexity of the problem also play a significant role in the processing time. So, while upgrading your computer may improve the speed of computations, it may not necessarily solve all issues related to long processing times.

Similar threads

Replies
4
Views
2K
Replies
6
Views
1K
Replies
8
Views
4K
Replies
4
Views
11K
Replies
7
Views
5K
Replies
2
Views
2K
Replies
4
Views
3K
Back
Top