- To find files that match a pattern, use dir.
- Use function syntax to pass the name of the file to the import or export function. (For more information, see Command vs. Function Syntax.)
how to load multiple .asc file in matlab which consists of numbers and text.
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello everyone,
im having a folder of .asc files which consists of hexadecimal values and timestamps, message name etc. that i have to decode to get a vehicle information. when i use the following code, each file is imported with its text data and number data in different cells.
location = uigetdir;
D = dir([location, '\*.asc']);
filenames = {D(:).name}.';
data = cell(1,length(D));
for ii = 1:length(D)
fullname = [location filesep D(ii).name];
[~, ~, data{ii}] = importdata(fullfile(fullname));
end
how do i load each .asc file in the folder where all the values appears in one single table/cell. if someone knows the answer please reply me with an answer it will be very useful for my work.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281876/image.png)
here is the picture sample of my file as im unable to insert a .asc file here
0 Commenti
Risposte (2)
Harshendra Shah
il 7 Apr 2020
Hi Padmamalini,
To import or export multiple files, create a control loop to process one file at a time. When constructing the loop:
You can refer the following documentation page for the same. You can also find a sample code here:
0 Commenti
Walter Roberson
il 7 Apr 2020
I showed you in https://www.mathworks.com/matlabcentral/answers/501609-how-to-read-a-really-large-lines-of-data-ascii-file-format-to-a-table how to read the data using textscan()
0 Commenti
Vedere anche
Categorie
Scopri di più su Large Files and Big Data in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!