% % generalized WKB -- code18.m (22 oct 2001 - djm) % %- - - - - - - - - - - - - - - - - - - - - - - - % coordinate matrices du = 0.05; u = -4-du/2:du:4+du/2; up = u; [u1 u2] = meshgrid(u,up); % first integral w/o damping global kk; kk = 1; integ = (u2.^2)./(u1.^3) + 4*u1 + 4*(kk^2)./u1; % contourplot figure(2); clf; figure(1); clf; contour(u,up,integ,[8.2 9.2 10.2 12.2]); hold on; contour(u,up,integ,-[8.2 9.2 10.2 12.2]); cbar title('\bf frequency phase plane'); xlabel('\omega(t)'); ylabel('\omega\prime(t)') while(1) % ODE file, IVs, final time, method % & options Xode = 'code18a'; T = 100; method = 'ode45'; tol = 1e-6; % input IVs figure(1); clear IVs; IVs = input('initial value (0