To understand where the command comes from, we need to inspect WAVE 's menu file. WAVE allows you to edit its menu file using any editor of your choice. By default, WAVE uses a simple Open Look text editor called textedit, which is included with the XView package used by WAVE . If you prefer to use another editor such as emacs, set and export the EDITOR environment variable before starting WAVE (you may wish to include this step in your .login or .cshrc). Most other UNIX applications that invoke an external text editor use the EDITOR environment variable in the same way.
Click left on the button in the Analyze window.
The comments at the beginning of the WAVE menu file describe how it works. Each of the buttons in the Analyze window (except for those in the first three rows) corresponds to an entry in the menu file. The first part of the entry - up to the first tab character - specifies the label that appears on the button; the remainder of the entry specifies the command that is inserted into the Analysis Commands window if you click left on the button. As noted in the comments, certain strings that begin with `$' are recognized as menu variables and are interpreted by WAVE before being passed to the shell in the Analysis Commands window. In the case of the sqrs command that appears in the Mark QRS complexes entry, these strings are `$RECORD', `$START', `$END', and `$SIGNAL'. WAVE replaces `$RECORD' with the record name, as it appears in the Record field of the Load window. `$START' is the time of the `<' marker, shown in the Start field of the Analyze window; if no `<' marker has been defined, the Start field contains the string `beginning of record', and `$START' becomes 0. Similarly, `$END' is the time of the `>' marker, shown in the End field; if no `>' marker has been defined, the End field is `end of record', and `$END' is determined by the record length as encoded in the header file for the record (see header(5), in the WFDB Applications Guide). Finally, `$SIGNAL' is taken from the Signal field of the Analyze window; it specifies which signal is to be analyzed. (For applications that can analyze more than one signal, the string `$SIGNALS' is taken from the Signal list field.) Examine the commands defined in the default WAVE menu; they should give you an idea of what is possible.
George B. Moody (firstname.lastname@example.org)