Is it possible to obtain the equations of fitted curve and differentiate it to obtain the the rate of change of the data

4 次查看(过去 30 天)
Hi there,
I have a set of data points which vary with time. I would like to be able to find the rate of change of the variables with time. I thought perhaps I could use the matlab curve fitting tool to find the function that best describes the data and then differnetiate the equations to obtain the rates. I am new to the curve fitting tool. So far I have found that the Shape-Preserving PCHIP fits the data quite well. The equation however is not cited under "Results".
Capture10.JPG
I then used the "Save to workspace" option under "Fit" in order to find out the equation for the function. In the matlab workspace, I opened the "fittedmodel" file which is a 1x1 cfit strcutre (?). Clicking on "Cfit" opens the matlab documentation page for the Cfit function which I don't think represents the function that I can then use and differentiate. Please could you let me know if what I am trying to do is possible and what the best way of doing it is.
Thank you!

回答(1 个)

madhan ravi
madhan ravi 2018-11-16
  1 个评论
minomi
minomi 2018-11-16
I read the link but it only helped me as far as I already had got.
When I save the fit to workspace, and it saves "goodness" , "output" and "fitted model" in the workspace. I am not sure what these are and how to get the mathematical equation for the polynomial and its coefficients?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by