Interpolation of matrices with data points having changing derivative
1 回表示 (過去 30 日間)
古いコメントを表示
Dear all,
I am trying to define a spline for a set of data whose derivative goes to zero after a certain set of time. Then I have to use this spline for interpolation in a for loop using ppval. But the problem is that in reality the derivative of the spline approaches to zero but the defined spline goes on increasing. At the start both values are matching, the actual and the spline but at larger values the deviation is greater.
In actual scenario, at approximately 20 value at the x axis, the y axis value keeps on increasing, but after that the y value remain approximately constant, even if x-axis value goes to infinity.
Thank you for your response in advance.
Regards
13 件のコメント
Star Strider
2024 年 5 月 2 日
@Muhammad Hassaan Bin Tariq — If you have a mathematical description of the process that created your data, convert that to a function that can be used as the objective function in one of the appropriate optimisation functions, for example lsqcurvefit (although there are several to choose from, depending on what you want). Once you get good estimates for the parameters, you can evaluate the function for other values of the independent variable.
You can also use the Symbolic Math Toolbox to calculate the derivative of the function, and convert that to an anonymous function that can then evaluate the derivative with the estimated parameters at given values of the independent variable.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spline Postprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!