I have a matrix of 16384x16384 that I want to save in txt file how to do please?
the code under didn't work :
>> fileID = fopen('vp.txt','wt');
>> fprintf(fileID,'\n',V);
>> fclose(fileID);

 Réponse acceptée

Walter Roberson
Walter Roberson le 10 Déc 2015
Modifié(e) : Walter Roberson le 10 Déc 2015

0 votes

fileID = fopen('vp.txt','wt');
fprintf(fileID,'%.15g\n',V);
fclose(fileID);
Note that this will create 268435456 lines of about 17 characters each, for a total of approximately 4.25 gigabytes. You might prefer a different format though. For example would you prefer a comma separated file with 16384 columns per line? Would you prefer engineering notation?

1 commentaire

sarah
sarah le 10 Déc 2015
Thank's it's Okay but I can'tr read the file to see if it's right okay.

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by