AM-demodulation task and I was asked to demodulate the signal in MATLAB and the result should contain three pictures.
plotting the $fft$ the (frequency spectrum)of the signal i was able to determine that the pictures are located at 0.1 , 0.25 and 0.5 frequencies.
The problem is that my code below only plot one picture which is located at 0 and I don't know how plot the shifted pictures that are located at 0.25 and 0.5 frequencies.
I tried to multiply it by complex exponential and still not able to plot the pictures
The main problem is that i need to shift those pictures that are located at 0.25 and 0.5 frequency to the center and apply my low pass filter, however i tried as the following code but failed. please help me.
The is the $fft$ of the signal.
I get a mysterious signal modulated with the message as a signal vector
z[n], by running the MATLAB function
mkhwdata. The parameters of this function are your social security number in one column vector, e.g.
z = mkhwdata ([xxxxxx]);The response from the function will be that a vector z containing the signal z[n], where the vectors first element corresponds to the time index n = 0.
• To convert a vector, e.g. vector
sdescribing the signal
s[n], to an image use the provided function
present_image. Try for example to watch the signal
clc close all; clear fc = 0.2; fs = 0.5; [z]= mkhwdata([xxxxxxxxx]); [Z,nu] = tdftfast(z); %N = length(z); n = [-0.5:1/0.5:0.5]; %n = N*(0:N-1); mult = 0.5.*exp(1i*2*0.25*pi.*n) + 0.5.*exp(-1i*2*0.25*pi.*n); mult2 = 0.5.*exp(1i*2*pi*0.5.*n) + 0.5.*exp(-1i*2*pi*0.5.*n); [z1] = ifft(Z.*mult); [z2] = ifft(Z.*mult2); %Lowpass filter [num,den] = butter(9,0.2); y = filter(num,den,z); y1 = filter(num,den,z1); y2 = filter(num,den,z2); figure(4) ylabel('Amplitude'); xlabel('Frequency (hz)'); subplot(221) present_image(z); subplot(222) present_image(y); subplot(223) present_image(y1); subplot(224) present_image(y2);