我在下面附加的 txt 文件中得到了一些输入。我想提取变量 x1 到 x6,其中的值位于冒号后的第一列中。(例如对于第一个 x2 -1.55155599552781E+00)
我已经试过了:
data = textscan(fileID,'%s %s %f %f %f')
但这没有用。最好的方法是什么?
729 6
===========================================================================
solution 1 :
t : 1.00000000000000E+00 0.00000000000000E+00
m : 1
the solution for t :
x2 : -1.55155599552781E+00 -2.39714921318749E-46
x4 : -2.01518902001522E+00 1.29714616910194E-46
x1 : 1.33015840530650E+00 2.03921256321194E-46
x6 : -2.10342596985387E+00 1.19910915953576E-46
x3 : 1.27944237849516E+00 1.99067515607667E-46
x5 : 2.44955616711054E+00 -1.48359823527798E-46
== err : 2.178E-13 = rco : 2.565E-05 = res : 1.819E-11 ==
solution 2 :
t : 1.00000000000000E+00 0.00000000000000E+00
m : 1
the solution for t :
x2 : 1.55762648294693E+00 1.44303635803762E-45
x4 : 2.10025771786320E+00 -6.97912321099274E-46
x1 : -1.28451613237821E+00 -1.19859598871142E-45
x6 : 2.01187184051108E+00 -7.54361111776421E-46
x3 : -1.33529118239379E+00 -1.22818883958157E-45
x5 : -2.44570040628148E+00 8.62982269594568E-46
== err : 2.357E-13 = rco : 2.477E-05 = res : 1.637E-11 ==