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')
답변 (1개)
KSSV
2019년 3월 11일
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')
카테고리
도움말 센터 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!