I am searching for an import routine to read NASTRAN punch
files for postprocessing into MATLAB. Think I am not the
only one, so there should be something available. However,
I did not find anything ...
Does anybody know where to get simple and free import
routines? Commercial programs like IMAT would be somehow
overengineered for my tasks.
Thanks a lot,
Stephan
Stephan,
There is a Matlab toolbox called IMAT that does that among
other things. In addition there is an ongoing sharing of
Matlab/Nastran interface tools on a Yahoo discussion list
called nastrandmap. The link is:
http://tech.groups.yahoo.com/group/nastrandmap/
Good luck!
-Paul Blelloch
hi i have been working in read the PUNCH file of nastran with matlab. after a few hours of work i arrive to read the file in 4 hours. but, is not sufficient (too much time to read a file), so i tried another code based in ' textscan' function. the main problem with this file is the size, is to big enougth to crash the matrix size, so i made sub matrix structure. each time that you work with this, it is necesary to to work with matrix not more big than 4000x4000. finally i arrived to read the PCH file in 60 seconds by the next code:
---------------------------------------------------------------------------------------
clear all
fid=fopen('your_file.pch','r');
block_size = 100;
a=1;
while ~feof(fid)
tline = textscan(fid,'%s',block_size,'delimiter','\n');
e = 1;
while e<=length(tline{1,1})
l = length(tline{1,1}{e,1});
for k = 1:(ceil(l/8))
b = k*8;
if (l)>=b
PCH{a,1}{e,k} = tline{1,1}{e,1}((b-7):b);
else
PCH{a,1}{e,k} = tline{1,1}{e,1}((b-7):(l));
end
end
e = e+1;
end
a = a+1;
end
fclose(fid);
----------------------------------------------------------------------------------------------
i hope this will help you.
Camilo