How can I determine conditions and interpolate where necessary?
이전 댓글 표시
Hello
Assumingly we have a conditional state for most of the y values on axis and need to interpolate where necessary or where there are no conditions.
For example if we say that, while y = 3 then var = 5, what if y = 2.5, var = ??
We have information that for every y value equals to 3 the var is equal to 5 but we don't have information for y equals to 2.5 regarding the corresponding var value. In this case, an interpolation should come.
Can you please provide some code ideas?
Thank you
댓글 수: 2
Dimitris Kalogiros
2019년 10월 31일
If you want to "interpolate" or "extrapolate", you should have more than one pair (y, var).
You must have a set of (y, var) pairs, and you would be able to find a missing pair , lets say (y1, var1), by means of an interpolation method.
So, what data exactly do you have?
Stelios Fanourakis
2019년 10월 31일
편집: Stelios Fanourakis
2019년 10월 31일
답변 (1개)
Dimitris Kalogiros
2019년 10월 31일
0 개 추천
Stelio
A good solution for you problem is to use polynomial interpolation.
Have a look here: https://www.mathworks.com/matlabcentral/fileexchange/899-lagrange-polynomial-interpolation
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!