This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc; | |
close all; | |
clear all; | |
%% Creating a large dataset | |
measurement = 9000:3000:24000; | |
lp = length(measurement); | |
dtime = zeros(lp,1); | |
derror = zeros(lp,1); | |
rtime = zeros(lp,3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
clc; | |
Fs = 1000; %sampling rate | |
T = 1/Fs; %sampling interval | |
L = 500; %Number of time points | |
t = 0:T:(L-1)*T; %time vector | |
N = 1024; %FFT points | |
% Define frequencies | |
f1 = 20; | |
f2 = 220; |