mkoctfile rwv.f wrapper.cpp -o disper.oct
In order for this to work, one must have the development package installed for Octave. In Debian 10 Linux, the packages needed installation are:
/usr/local/share/octave/site-m/
if you build BSU from the source tar archive. The locate command can also be helpful in other situations.
The disper() function returns a vector pv with fundamental and any higher modes. Here, it is demonstrated how to select and plot both fundamental and first higher mode. The higher mode becomes possible and recognized when the returned pv(2) value becomes > zero. This demonstration code searches backward to find the first non-zero case of the second component being non-zero.
Another similar code, moho.m is included that illustrates the same points as above. It shows how to display dispersion as a function of period rather than frequency.