Pass Additional Arguments into Guess Function for BVP
Show older comments
In the example given here:
What would be the syntax (if it's even possible) to pass an additional argument(s) into the guess function?
This is how it is currently written:
function yinit = mat4init(x) % initial guess function
yinit = [cos(4*x)
-4*sin(4*x)];
end
It fails if I do this:
solinit = bvpinit(linspace(0,pi,10),@mat4init,lambda,param);
function yinit = mat4init(x,param) % initial guess function
yinit = [cos(param*x)
-4*sin(param*x)];
end
I want to pass arrays/parameters into the guess function because the call to the function to solve my BVP will occur within another code and the proper initial guess will evolve/change for each call.
Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Linear Algebra 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!
