How to read a .map file
Mostra commenti meno recenti
Hello, I was just curious how you would read a .map file to MATLAB. Also when you use write table, how to reference a table by loop.
clearvars;
clc;
characters_to_write = {'example1' 'example2' 'example3'}';
example1 = array2table(rand(3,3));
example2 = array2table(rand(3,3));
example3 = array2table(rand(3,3));
for loop = 1:size(characters_to_write,1)
filepath = char(strcat('C:\main_path\sub_path\',characters_to_write(loop,1),''));
filename = strcat('C:\main_path\sub_path\',characters_to_write(loop,1),'\test_file_',characters_to_write(loop,1),'.csv');
if ~exist(filepath,'dir')
mkdir(filepath);
writetable(char(characters_to_write(loop,1)),filename,'Delimiter', ','); % this is where I'm trying to reference data in a loop
elseif exist(filepath,'dir')
writetable(char(strcat('output_',characters_to_write(loop,1)','_table')),filename,'Delimiter', ','); % curious
end
end
Thank you.
19 Commenti
Walter Roberson
il 6 Giu 2018
Are the .map files for Quake or for Duke Nukem 3D ?
Seok Joon Byun
il 6 Giu 2018
Walter Roberson
il 6 Giu 2018
... when we do not know which software produced the .map file, it is difficult for us to make suggestions about MATLAB software to read the .map file. .map is not a standardized file format: it is used for completely different software for completely different purposes.
Seok Joon Byun
il 7 Giu 2018
Walter Roberson
il 7 Giu 2018
If you knew which perl module, that would help.
Seok Joon Byun
il 7 Giu 2018
Walter Roberson
il 7 Giu 2018
Seok Joon Byun
il 7 Giu 2018
Walter Roberson
il 8 Giu 2018
What kind of data is in the .map file?
Is the perl code available for us to look at?
Seok Joon Byun
il 8 Giu 2018
Seok Joon Byun
il 8 Giu 2018
Walter Roberson
il 8 Giu 2018
Would a sample .map file be out of the question? You can zip it and upload the zip.
Seok Joon Byun
il 8 Giu 2018
Seok Joon Byun
il 8 Giu 2018
Walter Roberson
il 8 Giu 2018
I notice you are using MS Windows. Do you happen to have a Mac or Linux system available to you? If so then could you copy one of the .map files onto there, and then go into the command line of that system (e.g., Mac 'Terminal' utility), and use the "file" command and see what it says?
For example,
roberson$ file CA10.Cyl1.P01
CA10.Cyl1.P01: PCX ver. 2.5 image data
(That particular file turns out to have nothing at all to do with PCX, but at least the information gave me something concrete to investigate.)
Seok Joon Byun
il 8 Giu 2018
Walter Roberson
il 8 Giu 2018
Sorry, there just is not enough information available to us.
Seok Joon Byun
il 8 Giu 2018
Risposte (0)
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!