Clear Filters
Clear Filters


This question is closed. Reopen it to edit or answer.

To what power can Matlab compute to?

1 view (last 30 days)
George Carlisle
George Carlisle on 2 Oct 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
To what level can Matlab compute? I tried to do a permutation calculation and it only went to 9 digits before erroring. Also, are there limits in the education edition vs. the regular one?
Muthu Annamalai
Muthu Annamalai on 2 Oct 2015
You will get results upto double precision.
Steven Lord
Steven Lord on 2 Oct 2015
So to compute all permutations of a 20 element vector would require a matrix with this many rows and 20 columns:
>> nrows = factorial(20)
nrows =
How much memory would this matrix require, assuming 2 bytes per element?
>> ncols = 20;
>> bytes = 2*nrows*ncols;
>> exabytes = bytes/(1000^6)
exabytes =
According to Wikipedia that's roughly between 50000 and 300000 Libraries of Congress worth of data. So how long would it take you to process all those rows at one row per second?
>> processingOnePermutationPerSecond = years(seconds(nrows))
processingOnePermutationPerSecond =
That's 77 billion years. Earth is around 4.5 billion years old. You might want to rethink your approach to the problem that requires all those permutations.

Answers (1)

Sean de Wolski
Sean de Wolski on 2 Oct 2015
What do you need? With Symbolic Math Toolbox, included in Student version, you can symbolically work on very large numbers.
x = sym('pi')
y = x.^234

This question is closed.


No tags entered yet.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!