Effacer les filtres
Effacer les filtres

Resampling a Vector of a specific length between 0 to 100% (ie 100 points)

6 vues (au cours des 30 derniers jours)
Louise
Louise le 22 Juil 2021
Réponse apportée : KSSV le 22 Juil 2021
Hello,
I've a Ground Reaction Force with a specific length from Heel Strike to Toe Off.
My aim is to "normalize" its length from 0 to 100%.
In other words, I would like that the length of this vector (1098), attached, will have a length of 100 points.
I try without success the spline, interp1 function.... Thanks in advance for your help,
Louise

Réponses (1)

KSSV
KSSV le 22 Juil 2021
load('GRF.mat')
x = 1:length(GRF) ;
plot(x,GRF) ;
xi = linspace(1,length(GRF)) ;
GRFi = interp1(x,GRF,xi) ;
plot(x,GRF,'r')
hold on
plot(xi,GRFi,'.b')
legend('Original','Interpolated')

Catégories

En savoir plus sur Image Filtering and Enhancement dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by