convert data to a function using polyfit
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question


2 Comments
Share a link to this comment
Share a link to this comment
Accepted Answer
1 vote



2 Comments
Share a link to this comment
- That you don't understand it just means you don't understand the linear algebra that polyfit uses to generate a fit. That is irrelevant here, because while I could teach you to use bsxfun, you should not be using a polynomial fit at all here.
- If the fact the polynomial goes below zero is important, this essentially forces you to NOT use a polynomial, since a polynomial fit will always dip below zero in that region. Again, this is why you don't want to use a polynomial.
- That you don't know how to pass a spline into a function does not mean you should not use the tool. It just means you need to learn to use functions, and learn how to pass things around in MATLAB.
- No, you cannot extract a function "from" interp1. But I already showed you how to extract that function from pchip, for as much as you need to extract.
More Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)