No BSD License
Siamak Faridani (view profile)
01 Dec 2008
This simple script converts all the ASCII *.dat files in the current directory into mat files.
Watch this File
The code is not optimized but may help you in your project. I did not spend so much time refining it therefore if you have done so please post it here
i've modified your file a little bit. Now all files, that are in the current directory, are not saved in separate .mat files, but in one common.
matfiles = dir('*.csv');
for ind = 1:length(matfiles)
M = csvreadmy(matfiles(ind).name);
varname = genvarname(strrep(matfiles(ind).name,'.csv',''));
eval([varname ' = M']);
clear M ind matfiles varname
how to convert the mat file in matlab to other file format that can be used in catia either ascii (.asc) or other file?