Link to home
Start Free TrialLog in
Avatar of hsuyf
hsuyf

asked on

matlab- amplitude/phase spectra and Fourier transform

I had two signal one is periodic and the other is aperiodic.for example

 period like--> waveformPeriodic = [t1,sin(t1/10)];
aperiodic like--> waveformAperiodic = [sort(rand(100,1)*100),rand(100,1)];

How can I generate the amplitude/phase spectra and Fourier transform for them??
ASKER CERTIFIED SOLUTION
Avatar of gordonkennedy
gordonkennedy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hsuyf
hsuyf

ASKER

thanks Gordon
Hi Gordon

  I think I will pick 2 wave file for my aperiodic signal and periodic signal. So the presentation would like below, how can I generate the amplitude spectra, phase spectra, and FT. since i am very new to matlab i think it looks like easier for me... could you please help me about this. thank you in advance...

aperiodicwav = wavread('aperiod.wav');
[aper, f] = wavread('aperiod.wav');
periodicwav = wavread('period.wav');
[per, fc] = wavread('period.wav');

subplot(2,2,1), plot(aper), title('Entire waveform of aperiodic signal');
smallRange = 100000:100000+floor(f/100);

subplot(2,2,2), plot(per), title('Entire waveform of periodic signal');
smallRange = 100000:100000+floor(fc/100);

subplot(2,2,3), plot(?????????), title('phase spectra of aperiod signal');  -------> how can I plot "aperiod" signal'samplitude spectra, phase spectra, and FT here?

subplot(2,2,4), plot(???????), title('phase spectra of aperiod signal');    -------->how can I plot "period" signal'samplitude spectra, phase spectra, and FT here?
Hello hsuyf,

The answer I gave you already contains examples for how to achieve this.  

If you need additional help please could you accept my answer and then ask a new question ?

Thanks,
Gordon
Hello hsuyf,

I need to earn more points to get to Premium Membership.

If you think the answer I gave you was worth points (and hopefully you do because there's alot there) please could you accept it ?

Thanks,
Gordon