채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 6일

0 개 추천

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]

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Acoustics, Noise and Vibration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by