-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add modified Akima interpolation (univariate) as known from MATLAB ≥ R2017b #3188
Conversation
The modified Akima interpolation (aka Makima) avoids overshoots/undershoots and edge case of identical slopes that are present in the original Akima method. It is documented in https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/ by Cosmin Ionita from the MathWorks and also available since MATLAB R2017b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely comfortable with the Cosmin Ionita reference in the C-code.
Are there other references to this?
I am afraid, there is no other publication than the makima documentation by The MathWorks (https://www.mathworks.com/help/matlab/ref/makima.html#mw_e8ee1c8c-2cc3-46c4-90c4-c3208804ff4e) and this blog post. We could also utilize some disguising URL referrer such as https://tinyurl.com/makima-ref or https://tinyurl.com/modified-akima. |
To me that is concerning from a legal perspective. |
Understandable. Would it be OK for you if I directly ask Cosmin Ionita from The MathWorks about rights and permission to use makima in OSS projects? |
This does not make sense. The blog post is a publicly available web page. From a copyright point of view neither text nor a picture is used from this blog. Only information that is publicly shared in this post is utilized. It is completely fine to use this information. It is polite to reference this blog post (https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/). However, the MathWorks documentation should not be referenced. |
The copyrighted blog post is problematic since it (as far as I understand) both contain a textual description and code. We should at least make it really clear that we implemented the code based on the description in the text. |
The C file has the reference to the blog post only. https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/#3b78d49a-0e90-4c1d-9f16-49a23a175132 are the modified formulas I used as input for the C implementation. |
This link seems to be personalized. Please, use the following link in the description: https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/ |
That link is used in the C file. What else do you mean by description? |
Sorry. This is what I meant. All this looks fine now. |
@HansOlsson Is the link in the C file good enough after the discussion or do you insist on an extra description in the documentation of the table blocks. (Would be a good idea anyway to have all references listed, but we do not have Modelica.Blocks.UsersGuide.References yet.) |
I would prefer if it in some way stated that it was based on the description on that page - not the code on the same page. |
Instead of /* Reference:
Cosmin Ionita. Makima piecewise cubic interpolation, April 2019.
(https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/)
*/ I could write /* Reference:
Cosmin Ionita. Makima piecewise cubic interpolation, April 2019.
(https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/)
Note: The MATLAB code listings have not been utilized during implementation.
*/ But, too me, this looks rather odd as this note simply does not belong here when just giving the reference. There also is an official short-link, we could use: https://blogs.mathworks.com/cleve/?p=4707 |
I meant something like: "Reference - method description in: https://blogs.mathworks.com/cleve/2019/04/29/makima-piecewise-cubic-interpolation/" I don't view it as that odd. People often give page-numbers/chapters when referencing a book. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
The modified Akima interpolation (aka. Makima) avoids overshoots/undershoots and edge cases of identical slopes that are present in the original Akima method. It is documented in Cleve's corner by Cosmin Ionita from The MathWorks and also available since MATLAB R2017b.
This properly resolves #1039, which previously was closed as wontfix.