|
我想下面数据的每隔不同时间段的位移量平方的总和,例如每隔0.01秒,找一个接近这个时间的数据求这个时间的位移和上个时间,就是0.01秒之前那个位置的位移的平方,我不知道我的逻辑对不对,然后运行出来有问题,请大神帮我看下
数据
10.00000 10.00000 0.0000000E+00
9.560000 12.60000 4.0826998E-03
6.560000 10.72000 5.7680998E-03
8.000000 10.80000 9.9683004E-03
9.880000 9.800000 1.1211000E-02
8.880000 10.80000 1.4416700E-02
9.360000 11.44000 1.6414599E-02
7.480000 11.40000 1.8196600E-02
8.600000 10.44000 2.1517800E-02
10.04000 9.960000 2.4316000E-02
8.960000 10.96000 2.7926801E-02
8.360000 10.52000 3.0301800E-02
9.440000 10.40000 3.3982001E-02
10.36000 10.52000 3.5854898E-02
12.60000 11.48000 3.9078299E-02
9.040000 9.920000 4.2032901E-02
8.920000 10.04000 4.6360001E-02
8.200000 10.12000 4.9344700E-02
8.880000 8.960000 5.1477201E-02
8.640000 9.360000 5.4022800E-02
程序
[Fortran] 纯文本查看 复制代码 04 | real :: x , y , l , m , n , t , s , d |
05 | real :: x 1 , x 2 , y 1 , y 2 , t 1 , t 2 , t 0 |
10 | open ( 13 , File = '222.txt' ) |
14 | read ( 13 , * ) x 1 , y 1 , t 1 |
15 | read ( 13 , * ) x 2 , y 2 , t 2 |
16 | d = ( t 1 - t ) * ( t 1 - t ) - ( t 2 - t ) * ( t 2 - t ) |
18 | l = ( x 1 - x ) * ( x 1 - x ) + ( y 1 - y ) * ( y 1 - y ) |
|
|