Find a a value from a graph that is not in the array using reciprocal fit

1 view (last 30 days)
This is my code. So I plotted t1 and n and now I need to find the reciprocal and with the reciprocal find the t1 value of n=0.653. But at the end I am just getting an empty array.
t1= [6.22 3.59 2.68 2.53 2.19 1.82];
n= linspace(0.60,0.70,6);
plot(n,t1,"g")
hold on
p= polyfit(n,t1,1);
f1= polyval(1./p,n);
plot(n,f1)
index = find(n==0.653);
f1_point= f1(index);

Accepted Answer

Torsten
Torsten on 28 Aug 2022
t1= [6.22 3.59 2.68 2.53 2.19 1.82];
n= linspace(0.60,0.70,6);
f1 = interp1(n,1./t1,0.653)
f1 = 0.3875

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!