Here is most of the code
clear
clc
home
load ACCfilter
load ElapsedTime
%definitions
Fs = 32;
t = ElapsedTime; % sampling range
yno = ACCfilter;
[B,A] = butter(5,0.5/(Fs/2),'high');
y = filter(B,A,yno);
%plot in time domain
subplot(2, 1, 1); %
plot(t, y,'r'); grid on % plot with grid...
Here is the code
clear
clc
home
load ACCfilter
load ElapsedTime
%definitions
Fs = 32;
t = ElapsedTime; % sampling range
yno = ACCfilter;
[B,A] = butter(5,0.5/(Fs/2),'high');
y = filter(B,A,yno);
%plot in time domain
subplot(2, 1, 1); %
plot(t, y,'r'); grid on % plot with grid...
I am using fast fourier transforms to convert raw acceleration to displacement. I am able to get extremely close to expected results; however, I am having issues at the beginning of the dataset. I believe there may be an issue with the filter I am using.
Here is the code for the butterworth...
I am using fast fourier transforms to convert raw acceleration to displacement. I am able to get extremely close to expected results; however, I am having issues at the beginning of the dataset. I believe there may be an issue with the filter I am using.
Here is the code for the butterworth...
Thanks for the help guys, but the input is just a regular sin wave that I'm making noisier and nosier. I've called it acceleration for now before I actually start putting in data from the source. I don't think a high pass filter would help in this situation because after the FFT the results (ie...
thread384-296403
The aforementioned thread presents a code that deals with a normal sin wave quite well; however, I introduced noise into the code by adding a 2.5hz sin wave, 5hz sin wave and 25hz sin wave, which produced some unexpected results. See the attached graph for further details, the...