% This file is a function M-file. % Function M-files are used to define functions. % The file name is the same as the function name. % Function files may call global variables defined elsewhere. % The first command line in a function M-file starts with "function". function Dq = ode(t,q); % The values of R and C are assigned in example3.m global R C Dq = -1/(R*C)*q; return % Note that Dq stands for dq/dt in the ODE for RC circuit example. % See file example3.m now.