fmax_min - function to find maximum and minimum values in a seismic signal
void fmax_min( int npts, float s1[], float *fmax, float *fmin, int isw1, int *kmx, int *kmn )
Basic Seismic
Utilities (BSU) function scans the signal in s1 for the
maximum and minimum sample amplitudes. The user may choose
to perform this scan on either the signed data, or on the
absolute value of the data.
C-language version.
Arguments
npts (int)
Number of samples in the signal.
s1[] (float)
Signal to be scanned.
*fmax (float)
Pointer to the maximum value.
*fmin (float)
Pointer to the minimum value.
isw1 (int)
Switch to select type of scan.
0= scan the signed data (a large negative could be the minimum value)
1= scan the
absolute value of the data (a large negative could be the
maximum value).
*kmx (int)
Index for the maximum value
*kmn (int)
Index for minimum value
NOTE:
For an example, see this function used in bagc.c
bagc(1)
No known bugs
Copyright © 2024 by Paul Michaels
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
P. Michaels, PE. <paulmichaels@.boisestate.edu>