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!