0% found this document useful (0 votes)
8 views4 pages

2D FFT and AM Signal Processing

Uploaded by

Tesfaye
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

2D FFT and AM Signal Processing

Uploaded by

Tesfaye
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

2D FFT program

clc;
close all;
input_image=[1 1 1 1;1 1 1 1;1 1 1 1;1 1 1 1];
kernel=dftmtx(4);
output=kernel*input_image*(kernel)'

2D FFT program result


16 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

2D_invFT program

clc;
close all;
fourier_coeff=[16 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0];
kernel=dftmtx(4);
inverse_trans=1/16*kernel*fourier_coeff*kernel'

2D_invFT program result

1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1
AM program

clc;

close all;

t=0:0.001:1;

A=3;

fm=input('message frequency=');

fc=input('carrier frequency=');

mi=input('modulation index=');

sm=A*sin(2*pi*fm*t);

subplot(3,1,1);

plot(t,sm);

xlabel('Time');

ylabel('Amplitude');

title('Message signal')

subplot(3,1,2);

plot(t,fc);

xlabel('Time');

ylabel('Amplitude');

title('carrier signal');grid on;

sfm=(A+mi*sm).*sin(2*pi*fc*t);

subplot(3,1,3);

plot(t,sfm);
xlabel('Time');

ylabel('Amplitude');

title('AM signal');grid on;

AM program result

message frequency=200

carrier frequency=3000

modulation index=1
frequencyresponsehighpass program
close all;
clear all;
clc;
[X,Y]=meshgrid(-pi:.05:pi);
Z = 2-cos(X)-cos(Y);
surf(X,Y,Z),
axis([-3 3,-3 3,-0.5 3])

You might also like