URGENT Unable to load .mat file
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
load('C:\Users\mirla\Desktop\my_data_folder\velocity_data.mat')
Not a binary .MAT file. Try load -ASCII to read as text
load('C:\Users\mirla\Desktop\my_data_folder\velocity_data.mat','-ascii')
Input must be a MAT-file or an ASCII file containing numeric data with same number of columns in each row.
The file is about 24 GB large and is from 2015, so probably last use with the version of that year.
0 commentaires
Réponses (1)
Image Analyst
le 4 Juin 2020
Since it's not a binary .mat format file, but a text file, did you try opening it as text file and using fgetl() or fread() or textscan?
% Open the file for reading in text mode.
fileID = fopen(fullFileName, 'rt');
% Read the first line of the file.
textLine = fgetl(fileID);
lineCounter = 1;
while ischar(textLine)
% Print out what line we're operating on.
fprintf('%s\n', textLine);
% Read the next line.
textLine = fgetl(fileID);
lineCounter = lineCounter + 1;
end
% All done reading all lines, so close the file.
fclose(fileID);
Or you could try dlmread(), importdata(), or textscan().
4 commentaires
Voir également
Catégories
En savoir plus sur Text Data Preparation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!