PDE Toolbox - function handle specification
65 views (last 30 days)
Show older comments
I am setting up a system of equations using the PDE Toolbox, but I seem to be running into some issues with this. My current formulation uses function handles for some of the coefficients in the form f(location,state); however, when I attempt to set the model coefficients to these values, an error is thrown within the coefficient validation function (specifically, the portion where a check is made that the function is of the form f(p,t,u,time)).
I am confused why this form is needed as the documentation specifies that the function handle should be of the first form (having location and state passed as input arguments). Is this additional check intended to occur in all cases, or am I potentially misunderstanding the documentation here?
14 Comments
Torsten
about 1 hour ago
Edited: Torsten
4 minutes ago
It appears that this property is not set automatically and must be set manually by the user when initializing a model; however, this is not identified in the documentation as a necessary step when using function handles like the ones I've described (and the ones that are provided in the examples from the documentation).
Well, don't feel insulted, but I think it's self-evident that you need to first specify how many equations you want to solve if you want to use a function that needs this information to properly dimension its array sizes. But after all, it's good to hear that you could resolve your problem.
Answers (0)
See Also
Categories
Find more on Eigenvalue Problems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!