Problem with Interp1
Mostra commenti meno recenti
Hi, I cannot get interp1 to give me the correct answer. I have a simple, data set (see below) and all I want to do if use interpolation to give me the x value at y=thresh
thresh=225.5

My code is:
vq1 = interp1(x,y,thresh,'pchip')
This results in vq1=12207908.76
x=
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
9.00
10.00
11.00
12.00
13.00
14.00
15.00
16.00
17.00
18.00
19.00
20.00
21.00
22.00
23.00
24.00
25.00
26.00
27.00
28.00
29.00
30.00
31.00
32.00
33.00
34.00
35.00
36.00
37.00
38.00
39.00
40.00
41.00
42.00
y=
430.00
422.00
445.00
438.00
423.00
435.00
432.00
422.00
419.00
440.00
403.00
427.00
444.00
437.00
429.00
417.00
440.00
441.00
432.00
425.00
413.00
370.00
271.00
139.00
63.00
28.00
36.00
27.00
25.00
27.00
15.00
27.00
22.00
29.00
20.00
19.00
27.00
17.00
17.00
15.00
22.00
17.00
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Interpolation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!