Overcome matrix maximum size problem

2 visualizaciones (últimos 30 días)
Talaria
Talaria el 7 de Ag. de 2011
how could i possibly overcome the problem of being limited by matrix maximum size. i am thinking of maybe storing values to a file? is this possible?
suppose i have a code that lists a matrix of all binary possibilities from 0 to n, if n is too great the matrix would not be enough to store all values. what would be a good solution? also considering RAM limitations.

Respuesta aceptada

Jan
Jan el 7 de Ag. de 2011
Accessing the harddisk is about 1000 times slower than RAM access. And if the calculation of the permutations of more than 52 symbols (from your last post) takes some years, writing this to the disk will exceed the life time of the computer in every case.
The solution is easy: Do not do this. There is simply no reason to calculate a giantic array which such a tiny density of information. It will be more efficient to create the single lines (or rows) dynamically. For permutations this can be done e.,g. by:
  2 comentarios
Walter Roberson
Walter Roberson el 7 de Ag. de 2011
I believe you misread the previous posting. It wasn't about permutations, it was about finding all the binary strings of a certain length, n, n > 53
Jan
Jan el 7 de Ag. de 2011
@walter: You are right. The binary string problem is not a "permutation", but a "combination with repetitions". I spend much time to implement the 4 very efficient VChooseK(R)(O) as C-Mex in the FEX, but I still confuse the terms.
Thanks, Walter. As usual it is helpful to know, that you catch errors!

Iniciar sesión para comentar.

Más respuestas (1)

the cyclist
the cyclist el 7 de Ag. de 2011
It is possible to store values in files. Refer to the documentation on the "save" and "load" commands.
  1 comentario
Talaria
Talaria el 7 de Ag. de 2011
i meant saving data values, elements of matrix.
is this what you mean?

Iniciar sesión para comentar.

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by