Problem with get the equation of the signal.

1 次查看(过去 30 天)
Hello everyone, I would like to ask is that anyway that can I get the equation from this signal?
This signal is plotted by using the data from a table.
But I didn't found anyway to get the equation of this plotted signal :(
If anyone know, pls share the way to me. Thank you very much.
Please let me know if you know the way thankyou.

回答(1 个)

Vinai Datta Thatiparthi
Hello,
Since you haven't shared the data, my best guess would be that the function polyfit is what you're looking for.
Having said that, from the figure that you've shared, it appears that there might not be one equation that perfectly represents the data. A simple linear or quadratic equation may not be able to "fit" the data properly. The values that you get out of polyfit may not describe the plot correctly.
Alternatives:
  • You may use the function lsline that calculates the least-square values and plots predict the best fit line
  • Have a look at this answer on "Least fit" here: Link
  • Here's a write-up on Linear Regression (a linear equation that best describes the collection of points): Link
Hope this helps!

标签

Community Treasure Hunt

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

Start Hunting!

Translated by