function plotfp(inputfile)

% This script was used to help determine low pass filter cutoff frequency.

cmd = ['load ' inputfile '.mat'];
eval(cmd);

cmd = ['data = ' inputfile '.Force(2);'];
eval(cmd);

[b1,a1] = butter(2,.12);
[b2,a2] = butter(2,.1);
[b3,a3] = butter(2,.05);

fx1 = filtfilt(b1,a1,data.Force(1,:));
fy1 = filtfilt(b1,a1,data.Force(2,:));
fz1 = filtfilt(b1,a1,data.Force(3,:));
mx1 = filtfilt(b1,a1,data.Moment(1,:));
my1 = filtfilt(b1,a1,data.Moment(2,:));
mz1 = filtfilt(b1,a1,data.Moment(3,:));

fx2 = filtfilt(b2,a2,data.Force(1,:));
fy2 = filtfilt(b2,a2,data.Force(2,:));
fz2 = filtfilt(b2,a2,data.Force(3,:));
mx2 = filtfilt(b2,a2,data.Moment(1,:));
my2 = filtfilt(b2,a2,data.Moment(2,:));
mz2 = filtfilt(b2,a2,data.Moment(3,:));

fx3 = filtfilt(b3,a3,data.Force(1,:));
fy3 = filtfilt(b3,a3,data.Force(2,:));
fz3 = filtfilt(b3,a3,data.Force(3,:));
mx3 = filtfilt(b3,a3,data.Moment(1,:));
my3 = filtfilt(b3,a3,data.Moment(2,:));
mz3 = filtfilt(b3,a3,data.Moment(3,:));

figure
plot(data.Force(1,:));
title('Force x');
hold on;
plot(fx1,'r','linewidth',2);
plot(fx2,'k','linewidth',2);
%plot(fx3,'m','linewidth',2);
grid on;

figure
plot(data.Force(2,:));
title('Force y');
hold on;
plot(fy1,'r','linewidth',2);
plot(fy2,'k','linewidth',2);
%plot(fy3,'m','linewidth',2);
grid on;

figure
plot(data.Force(3,:));
title('Force z');
hold on;
plot(fz1,'r','linewidth',2);
plot(fz2,'k','linewidth',2);
%plot(fz3,'m','linewidth',2);
grid on;

figure
plot(data.Moment(1,:));
title('Moment x');
hold on;
plot(mx1,'r','linewidth',2);
plot(mx2,'k','linewidth',2);
%plot(mx3,'m','linewidth',2);
grid on;

figure
plot(data.Moment(2,:));
title('Moment y');
hold on;
plot(my1,'r','linewidth',2);
plot(my2,'k','linewidth',2);
%plot(my3,'m','linewidth',2);
grid on;

figure
plot(data.Moment(3,:));
title('Moment z');
hold on;
plot(mz1,'r','linewidth',2);
plot(mz2,'k','linewidth',2);
%plot(mz3,'m','linewidth',2);
grid on;
