% Example of a right-hand side of a system of two
% differential equations. The Matlab program
% ode23.m requires the function exactly in this form.
%
% Input:
% t ... independent variable (has to be carried along also
% in autonomous systems as a dummy-variable)
% y ... vector of independent variables
%
% Output:
% the vector field f as a function of t and y.
% Attention: f has to be a column vector.
function f = fcn(t,y)
f(1) = y(2);
f(2) = -y(1);
f = f';