Akzeptierte Antwort

Walter Roberson
Walter Roberson am 6 Mär. 2018

0 Stimmen

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]

Weitere Antworten (0)

Kategorien

Mehr zu Acoustics, Noise and Vibration finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by