| Author |
Message |
vjfaisal
Joined: 24 Sep 2006 Posts: 264 Location: pakistan
|
05 Aug 2007 20:20 Re: help me in matlab code ... |
|
|
|
|
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.
please help me in these question, detailed........
best regard
Added after 3 minutes:
here is my_results attached..........
|
|
| Back to top |
|
 |
Google AdSense

|
05 Aug 2007 20:20 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
echo47
Joined: 07 Apr 2002 Posts: 4206 Helped: 566
|
05 Aug 2007 21:12 help me in matlab code ... |
|
|
|
|
Which previous post?
Your code and attachments are missing.
|
|
| Back to top |
|
 |
vjfaisal
Joined: 24 Sep 2006 Posts: 264 Location: pakistan
|
05 Aug 2007 22:12 Re: help me in matlab code ... |
|
|
|
|
Hi , here is code
code:
N = 512;
dt = 1/fs; %sampling time
T = 1;
t = 0:dt:1;
y=textread('......txt');
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(y)
figure(2);
plot(f,mag1(1:N/2+1));
For attachements the link is:
http://www.edaboard.com/viewtopic.php?p=884933#884933
please also give me the concept of why frequency domain plots in -fs/2 to fs/2 or 0 to fs/2 range....
regards
|
|
| Back to top |
|
 |
echo47
Joined: 07 Apr 2002 Posts: 4206 Helped: 566
|
|
| Back to top |
|
 |
helios
Joined: 03 Jun 2005 Posts: 166 Helped: 12
|
07 Aug 2007 7:40 help me in matlab code ... |
|
|
|
|
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...
|
|
| Back to top |
|
 |
vjfaisal
Joined: 24 Sep 2006 Posts: 264 Location: pakistan
|
07 Aug 2007 7:58 Re: help me in these Questions ... |
|
|
|
|
hi
i have following question related to FIlters, if anyone knows ,please help me....
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
|
|
| Back to top |
|
 |