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!

 채택된 답변

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

댓글 수: 5

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))
got it now, thank you so much!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by