Adding a struct as third input parameter in a ode15s event
1 view (last 30 days)
Show older comments
Hi,
I have a problem. I want to use an event in my simulation in order to make a time specific change. In this problem I want to be able to change the specific time in an optimization problem, and then want to add a struct to the event as a third input parameter. Is this possible in some way?
So the description of the event becomes:
function [value,isterminal,direction] = event_1(t,y,d)
when I tried I only get "Not enough input arguments."
0 Comments
Answers (1)
Walter Roberson
on 17 Mar 2014
d = structure_to_pass_to_ode_event;
event_to_pass_to_ode = @(t,y) event_1(t, y, d);
0 Comments
See Also
Categories
Find more on Ordinary Differential Equations 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!