Normalise data by max envelope value

8 次查看(过去 30 天)
Emma
Emma 2024-5-31
回答: Zinea 2024-6-6
Hi peeps :)
So I have managed to use a function from Lei Wang to normalise my data for ("MVC"), and I need to use the maximum value from this envelope and divide each value in my other two data sets ("FT" and "RFE") by the max MVC value in order to normalise it, but I can't find on here advice/instructions for how I should do this: would anyone be able to point me in the right direction please? :) Here's what I have so far:
t= EMG1MVC(:,1) %finding the envelope of EMG1MVC
y= EMG2MVC(:,2) %finding the envelope of EMG2MVC
[upperEMG1,lowerEMG1] = envelope(t,f1,'analytic') %retrieve envelope data EMG1MVC
[upperEMG2,lowerEMG2] = envelope(y,f1,"analytic") %retrieve envelope data EMG2MVC

回答(1 个)

Zinea
Zinea 2024-6-6
Hi Emma,
To normalize the other two datasets (“FT” and “RFE”) using the maximum value from the MVC envelope, you first need to determine the maximum value from the envelopes you have obtained for your MVC data. Once you have this max value, you can divide each value in your “FT” and “RFE” datasets by this maximum value to normalize them.
Here is the code for your reference:
% Assume t, y, and f1 are already defined as per your snippet
[upperEMG1, lowerEMG1] = envelope(t, f1, 'analytic'); % Retrieve envelope data EMG1MVC
[upperEMG2, lowerEMG2] = envelope(y, f1, "analytic"); % Retrieve envelope data EMG2MVC
% Find the maximum value from the MVC envelopes
maxEMG1 = max(upperEMG1);
maxEMG2 = max(upperEMG2);
maxMVC = max(maxEMG1, maxEMG2); % Overall maximum for normalization
% Assuming FT and RFE are your data sets to be normalized
normalizedFT = FT / maxMVC; % Normalize FT
normalizedRFE = RFE / maxMVC; % Normalize RFE
Here, “normalizedFT and normalizedRFE are your normalized datasets.
Hope it helps!

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by