The Complete SPRLIB & ANNLIB

scale_output_dataset

- scale one output element of an IOSET dataset

SYNOPSIS

int scale_output_dataset (dset, newmin, newmax, index, outscale, outoffset)

ARGUMENTS

DATASET *dset A pointer to a DATASET structure.
double newmin The new minimum value.
double newmax The new maximum value.
int index The index in the Output.Vector of the element to be scaled.
double *outscale Returns the scaling factor used.
double *outoffset Returns the offset used.

RETURNS

TRUE if an error occured, FALSE if not.

FUNCTION

This routine rescales element index in the Output.Vector for all samples in dset. First, it is checked whether or not dset is an IOSET and if index is valid. If everything is okay, it finds the minimum and maximum values of that element and calculates outscale and outoffset. Then the values are replaced by Output.Vector[Index] = Output.Vector[Index] * outscale + outoffset. The calculated scale and offset are returned in the arguments outscale and outoffset.

SEE ALSO

transform_output_dataset

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998