Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Mzo. de 2018

0 votos

dmin = min(data(:));
dmax = max(data(:));
scaled_data = (data - dmin)./(dmax - dmin) * 2 - 1;
or more simply,
scaled_data = mat2gray(data) * 2 - 1;
Multiply by 2 and subtract 1 is a very convenient mapping from [0 1] to [-1 1]

Más respuestas (0)

Categorías

Más información sobre Acoustics, Noise and Vibration en Centro de ayuda y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by