MATLAB: PCMUQC Normalized Data Function
This code takes in an array of input data and normalizes it by dividing each element by the maximum absolute value in the array. If the maximum absolute value is negative, it takes its absolute value before performing normalization. The normalized values are stored in an array called 'x'.
function [ x ] = PCMUQC_normalized( inputData)
%% 归一化
b=max(inputData);
a=min(inputData);
if b<abs(a)
b=abs(a);
end
%归一化
x=zeros(1,length(inputData));
for i=1:length(inputData)
x(i)=inputData(i)/b;
end
end
原文地址: https://www.cveoy.top/t/topic/orVO 著作权归作者所有。请勿转载和采集!