Andrew - determining the different ways to call a function (calling syntax) can depend on how the function is written. For example, does your first function allow for the input parameters to be optional? If this function is written as
function [a] = drag_model(system, velocity, altitude)
if ~exist('altitude','var')
altitude = 100;
elseif ~exist('velocity','var')
velocity = 25;
end
then the above assigns default values to the velocity and altitude inputs, allowing the function to be called in one of three ways
drag_model(systemVar);
drag_model(systemVar,velocityVar);
drag_model(systemVar,velocityVar,altitudeVar);
where *Var are just the variables being passed into the function. Note that if you have not coded your function to allow for optional parameters, then the above calls would generate errors. Since no output parameter is included in the above calls, the a output will be returned but be unassigned (or rather, it will be assigned to the ans local variable).
Now if we do include the output parameter (so that a is assigned to something other than ans), then we have three more ways we can call this function
a = drag_model(systemVar);
a = drag_model(systemVar,velocityVar);
a = drag_model(systemVar,velocityVar,altitudeVar);
For your second function, events, you need not supply all output parameters, so it could be called as
events(t,y,system,m_events);
[value] = events(t,y,system,m_events);
[value, terminal] = events(t,y,system,m_events);
[value, terminal, direction] = events(t,y,system,m_events);
Again, depending upon how you have coded the function, the inputs can be optional (or not). Try executing the various combinations of your functions to get an idea of what works and what doesn't.