MATLAB: Do I get a warning when I run the example for global variables in MATLAB 7.0.4 (R14SP2)

MATLAB

When I run the example in the documentation for global variables given below (To bring up this documentation type
web([docroot,'/techdoc/matlab_prog/ch12_nd2.html#38052'])
on the MATLAB Command Prompt):
Create a file, lotka.m.
function yp = lotka(t,y)
%LOTKA Lotka-Volterra predator-prey model.
global ALPHA BETA
yp = [y(1) - ALPHA*y(1)*y(2); -y(2) + BETA*y(1)*y(2)];
Then interactively enter the statements
global ALPHA BETA
ALPHA = 0.01
BETA = 0.02
[t,y] = ode23('lotka',0,10,[1; 1]);
plot(t,y)
I get the following warning:
Warning: Obsolete syntax. Use ode23(fun,tspan,y0,...) instead.
> In funfun\private\odearguments at 41
In ode23 at 170

Best Answer

This enhancement has been incorporated in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
This is an error in the documentation for MATLAB 7.0.4 (R14SP2) within the global variables section of the MATLAB documentation.
Instead of:
Then interactively enter the statements
global ALPHA BETA
ALPHA = 0.01
BETA = 0.02
[t,y] = ode23('lotka',0,10,[1; 1]);
plot(t,y)
The documentation should read as follows:
Then interactively enter the statements
global ALPHA BETA
ALPHA = 0.01
BETA = 0.02
[t,y] = ode23(@lotka,[0,10],[1; 1]);
plot(t,y)