Plotting/Graphing Vertical Force Data compared to sacral marker height data
Mostra commenti meno recenti
I'm trying to figure out how to Interpolate my force data to be the same length as my sacral trajectory data and then plot both the vertical force and vertical sacral data on the same plot, but my vertical force data is showing a flat line... Not sure what's going on. Here is my code:
cd('C:\Excel Spreadsheets')
%Column of Data
a = xlsread('Assign 7_Increased_01.xlsx','H6:H3225');
b = xlsread('Assign 7_Increased_01.xlsx','W6:W649');
%Interpolation
a1 = interp1(a, linspace(1, length(a),101));
b1 = interp1(b, linspace(1, length(b),101));
yyaxis left
title('Normal Countermovement Jump')
xlabel('Normalized Time(%)')
ylabel('Vertical Force(N)')
plot(a1)
yyaxis right
hold on
ylabel('Sacral Marker Position(m)')
plot(b1)
xlim([0 101])
legend('Fz','Sacrum Z')
Risposte (1)
KSSV
il 11 Mar 2019
cd('C:\Excel Spreadsheets')
%Column of Data
a = xlsread('Assign 7_Increased_01.xlsx','H6:H3225');
b = xlsread('Assign 7_Increased_01.xlsx','W6:W649');
%Interpolation
a1 = interp1(a, linspace(1, length(a),1:101));
b1 = interp1(b, linspace(1, length(b),1:101));
yyaxis left
title('Normal Countermovement Jump')
xlabel('Normalized Time(%)')
ylabel('Vertical Force(N)')
plot(a1)
yyaxis right
hold on
ylabel('Sacral Marker Position(m)')
plot(b1)
xlim([0 101])
legend('Fz','Sacrum Z')
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!