How to extract matrix in a huge text file
Orbeman
ludo.wag at laposte.net
Fri Aug 17 07:54:17 CEST 2012
Hello,
I try to optimise the extraction of a huge matrix mxn of a text file. The
syntax of the text is :
single text line
matrix 1xn
single text line
matrix mxn
Data are exported from Moldflow (polymer injection software) with a native
patran format (.ele) like :
SCANDIUM Fiber orientation tensor on elements results
92622 102184 0 0 6
EleID Txx Tyy Tzz Txy Txz
Tyz
17542 +3.40330E-01 +3.30003E-01 +3.29667E-01 +7.10335E-05 +1.90178E-04
-1.56400E-04
17546 +3.38631E-01 +3.30777E-01 +3.30592E-01 +4.99531E-05 +1.41874E-04
+1.10836E-04
102183 +3.40153E-01 +3.30106E-01 +3.29742E-01 +6.99497E-05 +1.86002E-04
-1.99423E-04
17553 +3.48919E-01 +3.26850E-01 +3.24231E-01 -2.52756E-05 +1.52858E-04
-1.58712E-04
102184 +3.38454E-01 +3.30879E-01 +3.30667E-01 +4.88692E-05 +1.37698E-04
+6.78126E-05
17544 +3.47692E-01 +3.27132E-01 +3.25176E-01 -1.53594E-04 -2.83984E-04
+3.80141E-04
...
The function fscanfMat work fine il y a delete (manualy) the matrix 1xn. It
is a way to use this function without get an error with the presence of the
1xn matrix ?
At this this I read the file and I duplicate only the 3:$ line but it takes
too much time (about 60 s !).
Thanks !
I hope I was understable because I've some difficulties to speak (and write)
in english.
--
View this message in context: http://mailinglists.scilab.org/How-to-extract-matrix-in-a-huge-text-file-tp4024708.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list