File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ function am = amplitude
2
+
3
+ Ac = input(' Enter the value of carrier amplitude: ' );
4
+ m = input(' Enter the value of modulation index: ' );
5
+ fc = input(' Enter the value of carrier frequency: ' );
6
+ fm = input(' Enter the value of message signal frequency: ' );
7
+
8
+ Tfm = 1 / fm ;
9
+ Tfc = 1 / fc ;
10
+
11
+ t1 = 0 : Tfm / 999 : 6 * Tfm ;
12
+ t2 = 0 : Tfc / 999 : 6 * Tfc ;
13
+
14
+ carrier_wave = Ac * sin(2 * pi * fc * t2 );
15
+ subplot(3 ,1 ,1 )
16
+ plot(t2 , carrier_wave , ' r' );
17
+ title(' carrier signal' );
18
+
19
+ message_wave = (Ac / m )*sin(2 * pi * fm * t1 );
20
+ subplot(3 ,1 ,2 )
21
+ plot(t1 , message_wave , ' b' );
22
+ title(' Message Signal' );
23
+
24
+ am = Ac *(1 + m .* sin(2 * pi * fm * t1 )).*sin(2 * pi * fc * t1 );
25
+ subplot(3 ,1 ,3 )
26
+ plot(t1 , am , ' g' );
27
+ title(' Amplitude Modulated Wave' );
28
+ grid on ;
29
+
30
+ end
You can’t perform that action at this time.
0 commit comments