import from .dat file abaqus

34 visualizaciones (últimos 30 días)
Frank Oosterveld
Frank Oosterveld el 20 de Oct. de 2020
Comentada: Mario Malic el 21 de Oct. de 2020
hi all,
I try to import certain lines from my .dat file, generated from abaqus. However something strange happens. When I try to import the certain lines with use of Import Data button, select my lines and import it as a table and write it as a function 'importfile'. Then It's not importing the lines I want, but an arbitrary selection, even though the corresponding rows match. However if I copy and paste data from my abaqus generated .dat file, to an empty .dat file, open that one in matlab and select the lines I want to import, then it dóes import the correct lines.
Anyone a clue what is happening here? I tried almost all features in the Import Data toolbox, such as writing it as a different file (table, cell, etc.) but nothing works so far. The file is pretty large, can there be a problem?
I uploaded the file, I need the following data points, for every increment I need the values on the column below the PU2 and the frequency. Is someone keen to help me out? :)
NODE FOOT- U1 U2 PU1 PU2
NOTE
3739 9.4520527E-02 -1.9431870E+00 9.5103755E-02 1.9543827E+00
3739 SSD 1.0516381E-02 -2.0889238E-01 6.3486346E+00 -1.7386427E+02
INCREMENT NUMBER 31
FREQUENCY = 78.976194
  5 comentarios
Frank Oosterveld
Frank Oosterveld el 21 de Oct. de 2020
Found it! forgot the split function, with use of the following extra scripting, it works!! Thanks a lot for your time and attention :)
Wanted_row = [45994 45995 45999]
File_Data_1 = File_Data(Wanted_row)
row1 = split(File_Data_1{1})
row2 = split(File_Data_1{2})
frequency = split(File_Data_1{3})
cell2mat(cellfun(@str2num,row1,'uniformoutput',false))
cell2mat(cellfun(@str2num,row2,'uniformoutput',false))
cell2mat(cellfun(@str2num,frequency,'uniformoutput',false))
Mario Malic
Mario Malic el 21 de Oct. de 2020
Great to hear it works, KSSV's solution might be more appropriate when you would like to generalise the information extraction, without writing down the wanted rows like in that example.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by