Skip to content

wvConvertToInteger

  wvConvertToInteger converts a waveform channel to 16 bit integer format

  wvConvertToInteger converts floating point data in a sigTOOL waveform
  channel to 16 bit integer

  Data in the Map.Data.Adc field are scaled as
        out=(in-DC)/scale
  where:
        scale=(datamaximum-dataminimum)/65535
        DC=(dataminimum+datamaximum)/2;
  dataminimum and datamaximum will be calculated from the supplied data
  unless specified on input.

  Examples:
  channels=wvConvertToInteger(fhandle, chan)
  channels=wvConvertToInteger(fhandle, chan, dataminimum, datamaximum)

  channels=wvConvertToInteger(channels, chan)
  channels=wvConvertToInteger(channels, chan, dataminimum, datamaximum)

  data=wvConvertToInteger(data)
  data=wvConvertToInteger(data, dataminimum, datamaximum)

  Integer data are written to a temporary file
         [...., filename]=wvConvertToInteger(.....)
             also returns the name of the temporary file

  where:
        fhandle     is a sigTOOL data view handle
        channels    is a sigTOOL channel cell array
        data        is a sigTOOL channel cell array element or channel
                        structure

  Data output is to a temporary file in the system temp folder [as returned
  by tempdir()] which will be memory mapped.

  If fhandle is supplied, the figure application data area will be updated.

  -------------------------------------------------------------------------
  Author: Malcolm Lidierth 11/07
  Copyright © The Author & King's College London 2007-
  -------------------------------------------------------------------------