How can I import a Harwell-Boeing matrix to matlab.
Mostrar comentarios más antiguos
The problem with the matrix generated by Ansys is its definition, next you can see a part of the matrix:
Stiffness matrix from ANSYS FULL file dumped into Harwell-Boeing format
351181 9562 166029 166029 9561
RSA 9561 9561 166029 0
(I14) (I14) (d25.15) (d25.15)
F 1 9561
1 0.133854120867834e+04
28 0.899529610352173e+02
54 -0.114678611765949e+02
79 0.663666125908654e+02
109 -0.498567094031801e+02
138 -0.256735571427123e+03
166 -0.158108238272616e+03
178 0.791100342720065e+02
189 0.950413624927081e+02
199 -0.480044028990096e+03
211 0.333557350649636e+02
222 -0.971204842287534e+02
4 comentarios
FileExchange didn't find anything but Gargle returned <HB_to_MSM> which has links to a library of m-files that purport to solve the problem.
Looking at the above, where in the header lines are the array dimensions? Looks like it would be simple enough to just textscan the file for what I presume is array nonzero element index in first column and value in second; all one needs is to know what the actual size is intended to be it would seem.
It isn't clear why there's a FORMAT statement of
(I14) (I14) (d25.15) (d25.15)
when are only two columns, though? Is something fouled up in the data as shown vis a vis actual file?
Attaching a segment of an actual file would help immeasurably along with how to interpret the associated header for the specific file.
SERGIO A. ARDILA
el 11 de Jun. de 2017
Editada: dpb
el 11 de Jun. de 2017
Well, there's only one index; what's to convert? Is it the linear index into a 2D, 3D, ND array or just a vector? We don't know...
This file doesn't look anything like the other one in the link; don't see there's anything there that applies directly.
Is that all the data in that range; that is, you haven't just selected 1,28,54,... but that is the full file from 1 thru 54 (and so on)?
The key unknown here is just what size should the resulting array be?
SERGIO A. ARDILA
el 12 de Jun. de 2017
Respuestas (0)
Categorías
Más información sobre Lengths and Angles en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!