electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

FFT matlab problem


Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> FFT matlab problem
Author Message
intelnside



Joined: 06 Jun 2006
Posts: 44


Post26 Oct 2006 8:47   

amplitude fft matlab


Can anyone guide me how to using the matlab command fft to convert voice time domian to frequency domain?
please teach me...Crying or Very sad
Back to top
rsrinivas



Joined: 10 Oct 2006
Posts: 419
Helped: 36
Location: bengalooru


Post26 Oct 2006 8:50   

what is the amplitude means after fft


try spectogram to get a spectrum.
try audacity free sw to see the spectrum.

cheers
srinivas
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post26 Oct 2006 9:25   

wavread fft matlab


can teach me clearly using the spectrogram?
Another question:
please...because after i convert my noise time domian to freq doman, after that i need to filter out the unwanted noise. please...
if design filter just only can use freq domain , rite?
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post27 Oct 2006 5:01   

negative time fft matlab


no ppl reply?
Back to top
abmlad



Joined: 26 Oct 2006
Posts: 11


Post27 Oct 2006 9:09   

time domain to frequrncy domian in matlab


Hey You!

pls, help beginners sometimes. i need the solution manual for gonzalez book 2nd edition. pls help me?

I know you will help me!

thx
Back to top
bhishma



Joined: 27 Oct 2006
Posts: 16
Helped: 1


Post27 Oct 2006 13:07   

fft hertz matlab


using matlab for fft command is simple..
just read the voice file as an array of data and apply fft and display the spectrum.
to remove the dc component use fftshift.
Back to top
khubaibahmed



Joined: 24 Aug 2005
Posts: 31
Helped: 2


Post01 Nov 2006 8:11   

dc mean fft length dt


%Copy this code and run it in MATLAB
% Use mic to record sound ;test ur mic using windows recorder
%
Fs = 11025;
y = wavrecord(5*Fs,Fs); %Recording sound for 5 sec
t=[0:1/Fs:(length(y)-1)/Fs];
subplot(211)
plot(t,y),title('Time Domain Speach Signal'),xlabel('Time (t) '),ylabel('Amplitude')
[H,W]=freqz(y,1,2048,Fs);
subplot(212)
plot(W,abs(H)),title('Frequency Spectrum'),xlabel('Frequency (Hz)'),ylabel('Ampltide')
Back to top
amriths04



Joined: 15 Jul 2006
Posts: 241
Helped: 13


Post03 Nov 2006 11:08   

remover dc fft matlab


voice=wavread('file_name');
fvoice=abs(fft(voice));
plot(fvoice(1:25000))

the file--> 'file_name' must be in your current work directory..

for lp filtering..

butter(2,0.2);

AMRITH.S.


intelnside wrote:
Can anyone guide me how to using the matlab command fft to convert voice time domian to frequency domain?
please teach me...Crying or Very sad


Added after 2 minutes:

try thiis out (along with filtering),

close all;
clear all;

voice=wavread('file_name');
fvoice=abs(fft(voice));
plot(fvoice(1:25000));hold on;
[n d]=butter(2,0.1);
ff=filter(n,d,voice);
plot(abs(fft(ff)),'red')

hope u would also get it.

AMRITH.S.

intelnside wrote:
Can anyone guide me how to using the matlab command fft to convert voice time domian to frequency domain?
please teach me...Crying or Very sad
Back to top
poorfardm



Joined: 09 Aug 2005
Posts: 25
Helped: 1


Post07 Nov 2006 17:58   

frequency vector matlab


matlab help is the best place for learing fft you can try it firstly
matlab demo is another choice
Back to top
Hero



Joined: 06 Mar 2002
Posts: 145
Helped: 2


Post07 Nov 2006 18:17   

matlab fft issues


Hi,

You need also some DSP knowledge about DFT, IDFT and windowing techniques. I think that you need approprioate window function and FFT.
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post09 Nov 2006 18:41   

matlab fft problem


thank man, i will try it...

Added after 9 minutes:

guyz, i still got 1 more problem, if i wan to find the coefficient , its that using tis comand?
" [B,A] = cheby2(2,40,[Freq1, Freq2]);"
Back to top
rayudu419



Joined: 09 Feb 2006
Posts: 10


Post09 Nov 2006 20:17   

time shift fft matlab


hi

u go to the Matlab help ,enter the fft in search u will get full details of fft
Back to top
jakjoud



Joined: 06 Feb 2005
Posts: 163
Helped: 9
Location: Marrakech


Post09 Nov 2006 21:04   

design filter wavread fft


I think yes but type help cheby2 in matlab it will guide you through
Back to top
Google
AdSense
Google Adsense




Post09 Nov 2006 21:04   

Ads




Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post10 Nov 2006 15:16   

frequency domain plot


khubaibahmed, why ur code not using FFT to find the frequency spectrum?

Added after 24 minutes:

i oso got my code to find the frequency spectrum...
dun know why i got the plot frequency spectrum is symmetry.
tis is my code, can check for me what is my problem

[x fs]=wavread('D:\voice\stop8');
Fs=fs/2;
dt=1/Fs;%% time interval
t=(1:length(x))*dt; %%time vector

X=fft(x);
df=1/(length(x)*dt); %% frequency interval
f=(1:length(X))*df;%% frequency vector

%%
%%% time domain plot, time in seconds
figure
plot(t,x)
xlabel('Time (s)');
ylabel('Amplitude');
grid on

%% frequency domain plot, freq in hertz
figure
semilogy(f,abs(X));
title('stop')
xlabel('frequency(hz)');
ylabel('amplitude');
grid on

%%
figure
semilogy(f,20*log10(abs(X(1:length(x)))+eps));
title('stop')
xlabel('frequency(hz)');
ylabel('amplitude(db)');
legend('fft');
grid on;
Back to top
jakjoud



Joined: 06 Feb 2005
Posts: 163
Helped: 9
Location: Marrakech


Post10 Nov 2006 15:59   

shift a grid image matlab


If I did really understand what you're talking about is why do you have a symetrical spectral pattern.
That's because the Fourier transform give a symetrical spectral pattern but at zero it means that you should have some negative frequencis. Matlab shift all frequencies untill you have just positive ones. So if you don't like this you just need to use the command "fftshift" instead of "fft" then you'll have a symetrical spectral graph.
If that's not your problem just explain a bit more your problem!
good luck
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post11 Nov 2006 14:56   

dc component in matlab


FFT matlab problem
tis is my frequency, u try to check it out , it's symmetry.

Added after 2 minutes:

i just want the frequency from 0 till 2000hz, so that i can use chebyshev to design the filter.
anyone can help me?
Back to top
jakjoud



Joined: 06 Feb 2005
Posts: 163
Helped: 9
Location: Marrakech


Post11 Nov 2006 16:26   

fft en guide en matlab


So, as I told you Matlab shifts the negative part of frequency pattern. So you got a symmerical pattern. Just try to use the commande "fftshift" instead "fft" one it's the same syntax you need just to add "shift" to your command. You'll get thus a symetrical curve but with zero as symetry axe.

If you don't want to have the negative part, just limit your curve at 0. try this for exemple

f1=f(1:length(X)/2+1);

for l=1:(length(X)/2+1)
Y(l)=X(l);
end;

Then you try Y instead of X.


Good luck
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post12 Nov 2006 3:36   

matlab fft frequency vector


i still can't get the frequency.
Back to top
jakjoud



Joined: 06 Feb 2005
Posts: 163
Helped: 9
Location: Marrakech


Post12 Nov 2006 11:03   

frequency fft matlab


Ok, just try one more time this code
What you really want is that the half of the curve for f=0 to 2000.
if it's not what you want just try to explain more your problem.

[x fs]=wavread('D:\voice\stop8');
Fs=fs/2;
dt=1/Fs;%% time interval
t=(1:length(x))*dt; %%time vector

X=fftshift(x);
df=1/(length(x)*dt); %% frequency interval
f=(1:length(X))*df;%% frequency vector

%%
%%% time domain plot, time in seconds

f1=f(1:length(X)/2+1);

for l=1:(length(X)/2+1)
Y(l)=X(l);
end;

figure
plot(t,x)
xlabel('Time (s)');
ylabel('Amplitude');
grid on

%% frequency domain plot, freq in hertz
figure
semilogy(f1,abs(Y));
title('stop')
xlabel('frequency(hz)');
ylabel('amplitude');
grid on

%%
figure
semilogy(f1,20*log10(abs(Y(1:length(Y)))+eps));
title('stop')
xlabel('frequency(hz)');
ylabel('amplitude(db)');
legend('fft');
grid on;


Last edited by jakjoud on 12 Nov 2006 16:52; edited 1 time in total
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post12 Nov 2006 15:15   

matlab copy fft positive negative


FFT matlab problem
i got the this frequency.Neutral
Back to top
jakjoud



Joined: 06 Feb 2005
Posts: 163
Helped: 9
Location: Marrakech


Post12 Nov 2006 16:54   

fft matlab example


Really I don't understand this just make sure you did write the code rightly and please can you upload the wave file?
Back to top
fzhang



Joined: 05 Nov 2006
Posts: 13
Helped: 1


Post13 Nov 2006 11:42   

matlab fft remove dc component


I used to used single tone to verify my matlab scripts. hope it help.
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post13 Nov 2006 16:07   

matlab fft(archivo.wav)


this is my wav...


Sorry, but you need login in to view this attachment

Back to top
jakjoud



Joined: 06 Feb 2005
Posts: 163
Helped: 9
Location: Marrakech


Post13 Nov 2006 16:14   

matlab negative part


Ok try this code I think it does work. I tried it with your wav file and this what it gives

[x fs]=wavread('D:\voice\stop8');
Fs=fs/2;
dt=1/Fs;%% time interval
t=(1:length(x))*dt; %%time vector

X=fft(x);
df=1/(length(x)*dt); %% frequency interval
f=(1:length(X))*df;%% frequency vector

%%
%%% time domain plot, time in seconds
figure
plot(t,x)
xlabel('Time (s)');
ylabel('Amplitude');
grid on

f1=f(1:length(X)/2+1);
Y=X(1:length(X)/2+1);

%% frequency domain plot, freq in hertz
figure
semilogy(f1,abs(Y));
title('stop')
xlabel('frequency(hz)');
ylabel('amplitude');
grid on

%%
figure
semilogy(f1,20*log10(abs(Y(1:length(Y)))+eps));
title('stop')
xlabel('frequency(hz)');
ylabel('amplitude(db)');
legend('fft');
grid on;



Sorry, but you need login in to view this attachment



Last edited by jakjoud on 13 Nov 2006 16:18; edited 1 time in total
Back to top
intelnside



Joined: 06 Jun 2006
Posts: 44


Post13 Nov 2006 16:33   

fft voice


u already try my wav file?

Added after 7 minutes:

FFT matlab problem
i saw the website, they got his frequency..

Added after 5 minutes:

thank jakjoud, u helping me alot...
can u plot the freq same like this?

Added after 3 minutes:

jakjoud, i think your correct, anyway thank you very much...
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> FFT matlab problem
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
matlab fft (2)
limitations in FFT in matlab? (3)
FFT plots in Matlab (2)
FFT code in MATLAB (6)
FFT in MATLAB and SPICE (7)
FFT value with Matlab (3)
why FFT used in matlab??? (9)
FFT implementation using Matlab (3)
sampling in Cadence and fft in Matlab (8)
FFT Plot of audio signal (MATLAB) (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS