%
% This .m file includes examples of Matlab commands that may be helpful
%  in solving the work on Assignment #9 Project #2 
%
%  We can define a function of time (t) and two parameters  (a and b) using 
%  as an example the below simple function
%
myfunction=@(t,a,b) a*exp(-b*t)-.5*a;
% 
%  then we can set the the parameters a and b values
%
a=10.;
b=.3;
%   
%   Then we can define this as a function of just the variable t 
%    using
%   
funct=@(t) myfunction(t,a,b);
%  
%  and then we can use the below to plot the function over a particular renege
of values for t, in the below example on the interval [0,4]
%
fplot(funct,[0,4])
%
%  We can also use the below function to find the values where the function
%   is equal to zero using an initial starting guess (which you might get 
%   from looking at the graph) - in the below the starting point is set to 1.5
%
tt=fzero(funct,1.5)
%
%  You can use the above commands in a for loop to vary values of the 
%  parameters