Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Change matfile on harddrive

1 visualización (últimos 30 días)
Michael Madelaire
Michael Madelaire el 21 de Mzo. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi.
I am working a project with very much data. At one point I have to allocate space to a matrix that exceeds the capability of my computers RAM. As an example:
test = zeros(1000000, 14000);
This request cannot be made because "test" takes up 112 GB.
I then thought I could store the matrix on my harddrive and alter it without loading it entirely. Using:
save('test.mat', 'test', '-v7.3');
x = matfile('test.mat', 'Writable', true);
x.test(:, 123) = ones(1000000, 1);
This should change column 123 in the matfile on my harddrive to ones. My problem is that I cannot create the matrix to begin with, because it is too big.
I have then tried using:
test = sparse(1000000, 14000);
save('test.mat', 'test', '-v7.3');
x = matfile('test.mat', 'Writable', true);
This is all good, but when I try to rewrite the file,
x.test(:, 123) = ones(1000000, 1);
I get the error "Can't write file >PATH<".
Is there any way to save a matrix like the first example without first making it in your workspace? Or is there a way to rewrite the sparse matrix saved on the harddrive?
THANKS :D

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by