The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 interp1 function bug?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hajl Posted - 09/09/2019 : 09:15:10 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2018C(64bit) SR1 b9.5.1.195
Operating System:Win10

Hi,
While using the 'interp1' function for interpolation of a set of data with X values scaled in 'log' representation, the output is wrong.
quote:
interp1 ix:=Col(3) iy:=(Col(1), Col(2));

As the following picture shows.

The data is here.
X values used for interpolation:
quote:

X
0.0001
0.0005
0.00075
0.001
0.0012
0.0015
0.002
0.0025
0.003
0.004
0.005
0.0075
0.01
0.0253
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
0.125
0.15
0.175
0.2
0.225
0.25
0.275
0.3
0.325
0.35
0.375
0.4
0.45
0.5
0.55
0.6
0.625
0.65
0.7
0.75
0.8
0.85
0.9
0.925
0.95
0.975
1
1.01
1.02
1.03
1.04
1.05
1.06
1.07
1.08
1.09
1.1
1.11
1.12
1.13
1.14
1.15
1.18
1.2
1.23
1.25
1.3
1.35
1.4
1.45
1.5
1.59
1.68
1.77
1.86
1.94
2
2.12
2.21
2.3
2.38
2.47
2.57
2.67
2.77
2.87
2.97
3
3.05
3.15
3.5
3.73
4
4.75
5
5.4
6
6.25
6.5
6.75
7
7.15
8.1
9.1
10
11.5
11.9
12.9
13.8
14.4
15.1
16
17
18.5
19
20
21
22.5
25
27.5
30
31.3
31.8
33.3
33.8
34.6
35.5
37
38
39.1
39.6
41
42.4
44
45.2
47
48.3
49.2
50.6
52
53.4
59
61
65
67.5
72
76
80
82
90
100
108
115
119
122
186
193
208
210
240
285
305
550
670
683
950
1150
1500
1550
1800
2200
2290
2580
3000
3740
3900
6000
8030
9500
13000
17000
25000
30000
45000
50000
52000
60000
73000
75000
82000
85000
100000
128000
150000
200000
270000
330000
400000
420000
440000
470000
500000
550000
573000
600000
670000
679000
750000
820000
861000
875000
900000
920000
1.01E+06
1.10E+06
1.20E+06
1.25E+06
1.32E+06
1.36E+06
1.40E+06
1.50E+06
1.85E+06



The E value as shown in the picture as X.
quote:

E
9.54E-05
1.05E-04
1.16E-04
1.28E-04
1.41E-04
1.56E-04
1.72E-04
1.90E-04
2.09E-04
2.31E-04
2.54E-04
2.81E-04
3.09E-04
3.41E-04
3.44E-04
3.77E-04
3.82E-04
4.15E-04
4.24E-04
4.58E-04
4.71E-04
5.05E-04
5.23E-04
5.57E-04
5.81E-04
6.15E-04
6.46E-04
6.78E-04
7.17E-04
7.48E-04
7.97E-04
8.25E-04
8.85E-04
9.10E-04
9.83E-04
0.001
0.00109
0.00111
0.00121
0.00122
0.00135
0.00149
0.0015
0.00164
0.00166
0.00181
0.00186
0.00199
0.00208
0.0022
0.00233
0.00243
0.0026
0.00268
0.00291
0.00295
0.00326
0.00328
0.00359
0.00369
0.00396
0.00416
0.00437
0.00472
0.00482
0.00532
0.00536
0.00587
0.00612
0.00647
0.00699
0.00714
0.00787
0.00804
0.00868
0.00931
0.00958
0.0106
0.0109
0.0117
0.0128
0.0129
0.0142
0.0152
0.0156
0.0173
0.0184
0.019
0.021
0.0225
0.0232
0.0252
0.0253
0.0279
0.0308
0.0321
0.034
0.0375
0.0413
0.0419
0.0456
0.0503
0.0554
0.057
0.0612
0.0675
0.0744
0.0821
0.0905
0.0999
0.11
0.121
0.128
0.134
0.148
0.163
0.18
0.198
0.219
0.223
0.241
0.266
0.294
0.324
0.357
0.394
0.435
0.48
0.49
0.529
0.583
0.644
0.71
0.783
0.864
0.953
1.05
1.16
1.28
1.41
1.56
1.72
1.81
1.89
2.09
2.3
2.54
2.56
2.8
2.82
3.11
3.43
3.79
4.18
4.21
4.61
4.64
5.08
5.12
5.61
5.64
6.23
6.87
7.58
8.42
9.28
9.35
10.2
10.4
11.3
11.4
12.6
12.7
13.9
15.3
16.8
18.6
18.8
20.5
21.2
22.8
23.2
25.5
25.6
27.9
28.1
30.3
33.4
36.6
36.9
39.6
43.3
47.1
47.5
51.3
51.6
55.8
56.2
60.2
60.7
66.4
72.3
78.1
78.6
86.1
86.7
93.7
94.3
101.877
102.59
110.811
111.587
119.684
120.528
132.015
132.947
143.592
155.097
156.184
171.078
172.276
187.384
202.398
203.816
221.689
223.252
239.452
241.129
264.124
265.974
287.285
310.289
312.478
325.891
342.26
344.675
374.9
404.919
407.775
440.427
449.791
479.048
489.234
532.136
570.747
578.799
620.797
638.437
684.762
689.559
744.81
810.123
833.143
881.164
899.855
958.435
978.765
1060
1140
1150
1240
1280
1370
1380
1490
1620
1670
1760
1800
1900
1960
2120
2130
2270
2300
2480
2560
2740
2760
2860
2980
2980
3240
3330
3520
3600
3810
3890
4230
4290
4530
4700
4960
5080
5510
5520
5950
6180
6440
6760
7080
7450
7760
8300
8550
8970
9300
9750
10140
10580
10610
11030
11540
12330
12840
13510
13770
14900
14950
16610
17940
18060
19510
19780
21330
22450
22850
22970
25100
25500
27100
27350
29900
29910
30000
32920
33210
35870
36420
39020
40280
42600
42660
45670
45940
50350
50990
52150
54690
59820
60410
61690
66420
70480
70970
71750
77730
80560
85140
90000
90630
91890
100000
101990
108840
110000
119640
120000
130000
132850
140000
143490
150000
155450
160000
170000
171130
179800
184910
187850
190000
195000
200000
205000
206800
210000
216520
219020
220000
225000
229670
230000
233000
235000
236000
239000
242000
242370
244000
245000
245000
246000
248000
248600
250000
255000
260000
265000
270000
280000
290000
300000
310000
320000
330000
340000
349660
360000
369040
370000
380000
400000
420000
440000
460000
479740
500000
520000
523670
525550
540000
543810
563950
584090
604230
608470
628750
638810
658190
664660
689590
704940
714880
743250
755290
805640
861990
912700
919140
970200
976990
1.02E+06
1.03E+06
1.05E+06
1.11E+06
1.12E+06
1.21E+06
1.22E+06
1.30E+06
1.33E+06
1.41E+06
1.44E+06
1.49E+06
1.51E+06
1.60E+06
1.61E+06
1.71E+06
1.75E+06
1.80E+06
1.83E+06
1.84E+06
1.90E+06
1.93E+06
2.00E+06
2.01E+06



The CS values as shown in the picture of Y.

quote:

CS
15281.2
14550
13853.8
13190.9
12559.7
11958.7
11386.5
10841.6
10322.9
9828.9
9358.59
8910.78
8484.39
8078.42
8051.94
7691.86
7641.47
7323.81
7251.49
6973.37
6881.34
6639.69
6529.7
6321.99
6195.96
6019.48
5878.92
5731.46
5578.04
5457.21
5292.23
5196.09
5021
4947.46
4763.37
4710.73
4518.9
4485.33
4286.69
4270.72
4066.37
3871.8
3859.12
3686.55
3662.4
3510.16
3463.84
3342.21
3275.59
3182.3
3097.12
3030.04
2927.95
2885.07
2767.59
2747.03
2615.6
2607.03
2490.46
2457.6
2371.31
2315.95
2257.86
2173.86
2149.84
2046.99
2040.29
1949.07
1910.22
1855.83
1786.79
1767.05
1682.52
1665.91
1602.03
1548.06
1525.4
1452.43
1433.27
1382.96
1321.74
1316.81
1253.83
1211.6
1193.86
1136.76
1102.41
1082.4
1030.63
995.923
981.345
939.897
938.818
893.925
851.181
834.225
810.482
771.731
734.833
730.023
699.703
666.253
634.403
626.04
604.078
575.205
547.713
521.536
496.614
472.886
450.295
428.79
418.8
408.319
388.835
370.289
352.632
335.818
319.803
316.655
304.548
290.016
276.174
262.988
250.433
238.479
227.1
216.268
214.141
205.962
196.148
186.798
177.892
169.404
161.318
153.627
146.313
139.351
132.714
126.405
120.39
114.647
111.596
109.193
104.002
99.0677
94.3527
94.0466
89.8808
89.5904
85.3185
81.251
77.4034
73.7533
73.4796
70.2505
69.9907
66.9235
66.6768
63.769
63.535
60.518
57.6598
54.9359
52.1429
49.6858
49.5264
47.3404
47.0348
45.1087
44.9661
42.6945
42.535
40.6896
38.9099
37.0666
35.3315
35.1042
33.6717
33.1279
31.9822
31.6779
30.2809
30.1685
28.9774
28.8732
27.8046
26.4977
25.355
25.2737
24.426
23.364
22.4373
22.3567
21.5428
21.466
20.6821
20.608
19.9301
19.8594
19.0026
18.2514
17.5911
17.5288
16.7769
16.724
16.1146
16.0642
15.4844
15.4296
14.8736
14.8211
14.3396
14.2894
13.6818
13.6389
13.1488
12.68
12.6357
12.1023
12.0651
11.5957
11.1855
11.1467
10.7184
10.6809
10.3405
10.3052
9.87532
9.84522
9.49848
9.16716
9.13564
8.96585
8.75875
8.73225
8.4005
8.1113
8.08379
7.80858
7.72965
7.51501
7.44029
7.16241
6.94333
6.89764
6.68694
6.59844
6.3982
6.37928
6.16131
5.94112
5.86351
5.72366
5.66922
5.51723
5.46448
5.268
5.11179
5.0955
4.93213
4.86952
4.72802
4.71455
4.56061
4.40494
4.35008
4.2512
4.21263
4.1175
4.06789
3.94121
3.92916
3.83036
3.80753
3.69214
3.64793
3.54801
3.53857
3.49013
3.43143
3.4299
3.32157
3.28146
3.21307
3.18459
3.11831
3.09064
2.99451
2.9762
2.91635
2.87529
2.81876
2.79304
2.71047
2.7079
2.63713
2.59952
2.56153
2.51717
2.4768
2.43072
2.39832
2.33997
2.31675
2.27852
2.25089
2.21387
2.18617
2.15495
2.15255
2.12659
2.09508
2.05212
2.02468
1.99331
1.98118
1.93273
1.93049
1.86925
1.82668
1.82266
1.78123
1.77336
1.73797
1.7124
1.70462
1.70223
1.66163
1.65497
1.62825
1.62466
1.58672
1.58658
1.58551
1.55228
1.54939
1.52279
1.51736
1.49501
1.48416
1.46912
1.46879
1.45035
1.44894
1.42607
1.42385
1.41985
1.41204
1.39632
1.3945
1.39254
1.38757
1.38332
1.38339
1.38399
1.3886
1.39079
1.40267
1.4153
1.41759
1.42337
1.46075
1.4748
1.52336
1.53156
1.62959
1.6333
1.77504
1.83051
1.96986
2.06295
2.23643
2.43529
2.60124
3.10114
3.17864
3.77108
4.2063
4.49872
4.71218
5.28451
5.93477
6.66078
6.94638
7.4526
8.54066
8.95529
9.11538
9.90619
10.5374
10.5826
10.9067
11.0813
11.166
11.3422
11.4333
11.4384
11.4484
11.4413
11.4413
11.4283
11.3716
11.3512
11.2906
10.9544
10.4862
9.93444
9.34282
8.17779
7.12906
6.24533
5.52006
4.92963
4.44831
4.05354
3.73798
3.45452
3.24703
3.22494
3.0298
2.71784
2.48143
2.29743
2.15091
2.03343
1.93371
1.85291
1.83862
1.83218
1.78283
1.77031
1.7116
1.66083
1.6171
1.60819
1.57055
1.55248
1.52242
1.51277
1.4802
1.46092
1.45048
1.42139
1.40904
1.36841
1.33286
1.30765
1.30458
1.28461
1.28207
1.26908
1.26708
1.26174
1.24839
1.2472
1.23464
1.23406
1.22939
1.22982
1.23192
1.23463
1.23921
1.24157
1.2562
1.25815
1.28243
1.29489
1.31518
1.32472
1.33075
1.35463
1.36806
1.39353
1.39883

1   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 09/09/2019 : 11:25:56 AM
Hi,

This seems like a bug. When the x value spacing differs a lot, the interpolation is not properly performed. We will see if we can improve it. As a work around, please take logarithm on the x values before running interpolation. See below.



Thanks,
James

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000