fft - Trouble doing fourier transform of ASK using MATLAB -


we have ask modulated signal. need fourier transform, therefore used fft, need abs() 1 side? , code complete? i'm not sure how transfer time domain (t) frequency domain (f) in order matlab.

clear all; clc; close all;  f1=input('enter frequency of carrier='); f2=input('enter frequency of pulse='); a=3; t=0:0.001:1; x=a.*sin(2*pi*f1*t); u=a/2.*square(2*pi*f2*t)+(a/2); v=x.*u;  figure subplot(4,1,1); plot(t,x); xlabel('time'); ylabel('amplitude'); title('carrier'); grid on; subplot(4,1,2); plot(t,u); xlabel('time'); ylabel('amplitude'); title('square pulses'); grid on; subplot(4,1,3); plot(t,v); xlabel('time'); ylabel('amplitude'); title('ask signal'); grid on; fs=100; q=fft(v); subplot(4,1,4); plot(fs,q); grid on; 

if not sure if should use abs() or not, use it. more info.

fs=100; q=abs(fft(v)); subplot(4,1,4); plot(q); 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -