# help me in matlab code ...

Status
Not open for further replies.

#### vjfaisal

##### Full Member level 4
hi

i m cofused in some Question as in previous post , yet not cleared....
i m posting some of my results(pics) of the above code , plz try download it and try to explain me from these ........

1) first the original signal in text form ,i read it in matlab
2) The FFt of the origial signal ( This gives a complex plane)
3) why we need Absolute of the FFT .

Q1. please see in pic , that taking absolute gives us replica after the samples of 240 (half) . what does this means......
Q2. after taking absolute, we take magnitude? what difference could be analyse in both these? please explain it complete.

Q3: also tell what is the difference between in N samples ( 512, 4096,e.t.c),
and n , in filtertering for.e.g [n,wn,beta,type]=kaiserord(fc,a,dev,Fs), and 'n' in the above example.

best regard

here is my_results attached..........

#### echo47

Which previous post?

Your code and attachments are missing.

#### vjfaisal

##### Full Member level 4
Hi , here is code

code:
N = 512;
dt = 1/fs; %sampling time
T = 1;
t = 0:dt:1;
Y = fft(y,N);
Pyy = 2*abs(Y) / min(N,T/dt);
mag1 = 20*log10(abs(Pyy));
f = 1/dt*(0:N/2)/N;
figure(1);
plot

figure(2);
plot(f,mag1(1:N/2+1));

please also give me the concept of why frequency domain plots in -fs/2 to fs/2 or 0 to fs/2 range....

regards

#### echo47

Cross-posting gets confusing and isn't allowed on EDAboard. Please stay in your original discussion:

#### helios

##### Full Member level 2
As u know the FFT results in a complex domain values...and the real part is the magnitude of the frequency spectrum and the imag part is the phase diffrence..

so while ploting the FFT ..u dont need the imag part...so taking a (abs) gives the magnitude part of the freq spectrum...and u use the Log transform to enhance the results for visually better plot.

hope it might have cleared u r doubts...

#### vjfaisal

##### Full Member level 4
Re: help me in these Questions ...

hi

Q1: WHy and How the concept of Extremal Frequencies Arise in optimal (Equiripple) technique, as there is no such concepts in Windows and frequency response technique ??

Q2:
What is remez exchange algorithm ( used in Equiripple technique) basics or FOrmula or End results ??

Q3: Are all the FIR filters (kaiser , Equiripple e.t.c ) are in time domain or frequency domain ??

best regards

Status
Not open for further replies.