You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few improvements in the interface of prepareDatahandleForIntegration which we would like to implement.
Rename the parameter that accepts a numerical integrator from solver to integrator.
Caution
Don't forget to also adjust the documentation, in particular the readme and github-pages website! There may also be other pieces of documentation aside from the ones mentioned here, so try to be as thorough as possible to ensure consistency across the board.
Make the integrator parameter accept both function handles and char arrays as inputs.
Add user warnings for unrecognized or unused parameters.
Proposed solutions
Check if integrator parameter is a function handle using isa(x, 'function_handle' ). If so, then convert it to a char array using func2str(x).
Use optionlists for parameter validation. This functionality is bundled with IFDIFF and can be found in the Tools folder of the project.
We do not use MATLABs native argument validation because this feature was only introduced recently (2019b) and we want to stay backwards compatible (to a reasonable degree, so stick to around MATLAB2014 if possible).
Summary
There are a few improvements in the interface of
prepareDatahandleForIntegrationwhich we would like to implement.solvertointegrator.Caution
Don't forget to also adjust the documentation, in particular the readme and github-pages website! There may also be other pieces of documentation aside from the ones mentioned here, so try to be as thorough as possible to ensure consistency across the board.
integratorparameter accept both function handles and char arrays as inputs.Proposed solutions
integratorparameter is a function handle usingisa(x, 'function_handle' ). If so, then convert it to a char array usingfunc2str(x).Toolsfolder of the project.