MATLAB Coding | matlabcoding.com
10.3K subscribers
138 photos
31 files
908 links
Everything Free. BOOKS, MATLAB PROGRAMS, CODES and Study Materials. Also Questions and Answers. For older/archived post visit matlabcoding.com
Books - https://amzn.to/3PnfYnN

Reach us - info.matlabcoding@gmail.com
Download Telegram
clear all
Fs = 1000; % sampling frequency
dt =1/Fs; % time increment
tfinal = 1 ; % time of measurement 1sec
time=0:dt:tfinal;
% My signal sum of 60Hz and 120Hz sin wave
y=sin(2*pi*120*time)+0.5*sin(2*pi*60*time);
L =length(time); % length of signal
SRC=zeros(1,L);
f=1/dt; % Maximum frequency
NFREQ = 1000;
FREQ = linspace(0,f,NFREQ);
% % INITIALIZE FOURIER TRANSFORMS
K = exp(-1i*2*pi*dt*FREQ);
for T = 1 : L
for nf = 1 : NFREQ
SRC(nf) = SRC(nf) + (K(nf)^T)*y(T);
end
end
% % FINISH FOURIER TRANSFORMS
SRC = SRC*dt;
plot(FREQ,abs(SRC(1:NFREQ)))
MATLAB Coding | matlabcoding.com pinned «join here with 27k people https://www.facebook.com/groups/MATLABCODES/»
Forwarded from Technical Expert
Do Rating for 100 Days Challenge videos Rating. Before rating do check this videos. this feedback helps alot for future videos. https://www.youtube.com/playlist?list=PLNhFkFk6qEgJ9g3RUR8PtnD_Rw2KmsAR1
Anonymous Poll
38%
5 : Excellent
18%
4: Best
23%
3: Good
14%
2: Okay
7%
1: Not useful