function plot_c(p)
%PLOT_C Plots the phase and group velocities versus wavenumber.
%   PLOT_C(P) plots the phase and group velocities, using the wave
%   parameter P. If none provided, use default values for the air-water
%   interface at infinite depth (see WAVE_PARAMETER).

if nargin==0
    p=[];
end

p = wave_parameter(p);   % fills the default values in p

k=linspace(1,1e4,1e4);
[w,c,cg]=omega(k,p);
if true
    lambda=2*pi./k;
    loglog(lambda,c,'r-',lambda,cg,'b-');
    xlabel('\lambda, m')
else
    loglog(k,c,'r-',k,cg,'b-');
    xlabel('k, m^{-1}')
end
ylabel('c, c_g,  m/s');
legend('Phase velocity c','Group velociy c_g');
