Problems in opening/importing .asc files with headers.
Afficher commentaires plus anciens
Dear all,
Does anyone has the idea of opening such an .asc file? I am facing some problems of opening .asc files by codes. I tried the fopen function and the fread function, I cannot get rid of the headers and the matrix values become very ridiculars. And I also tried with the importdata function, I cannot get rid of the headers and all the data becomes one-column cell-type variables. My matlab version is R2017a. And I attached the data in the zip-file. Thanks in advance!
%% Test with the importdata
filepath = 'C:\Ming\Ming Research Labwork\Coding\20190617test\';
filename = strcat('irdata_001.asc');
fid = importdata([filepath filename], '\t');
%% Test with the fopen and fread.
filepath = 'C:\Ming\Ming Research Labwork\Coding\20190617test\';
filename = strcat('irdata_001.asc');
fid = fopen([filepath filename], 'r', 'n');
A = fread(fid,'double');
1 commentaire
Mingz Lee
le 17 Juin 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur String Parsing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!