How to interpolate if the function is not strictly monotonic increasing

Hi all
I am struggling with interpolating the Temperature from my function which reaches a constant mole fraction after a certain temperature. How can I interpolate the first temperature point at which the constant mole fraction is reached? Thanks a lot in advance!

 Accepted Answer

hi, try :
n=2;
T2=interp(T,n);
%size(T2)=n*size(T);
fine?

5 Comments

hi, thanks for the reply, i don't quite get it though...
i get a vector T2 with double the size of T, but now? why is the size... line commented?
hi, just to notice that the interpolated vector has augmented size, so you need to also interpolate the "molefraction" vector n times as the first, i think this is the problem right? if its about an other issue then let me know , can you provide some data to work with,?
assuming n = [0.8 0.88 0.89 0.90 0.90 0.90] and T = [450 455 460 465 470 475] I want to get the first temperature where 0.90 is reached which in this case is 465 Kelvin. How can I do it?
ok try :
Index=find(n==0.90);
T(Index(1))

Sign in to comment.

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!