Plotting/Graphing Vertical Force Data compared to sacral marker height data

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')

Antworten (1)

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')

Kategorien

Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 11 Mär. 2019

Beantwortet:

am 11 Mär. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by