DEV Community

Discussion on: I made a Text-to-handwriting tool to write my college assignments for me 🤓

Collapse
 
gotlashivasaiyadav profile image
gotlashivasaiyadav

clc;
clear all;
t=-5:0.001:5;
fm=input('enter the modulating signal Frequency')
%fm=0.2;
x=sin(2*pi*fm*t);
fc=input('enter the carrier signal Frequency')
%fc=4;
y=cos(2*pi*fc*t);
m=input('enter the modulation index');
%m=10;
z=m*x;
s=cos(2*pi*fc*t+z);
subplot(3,1,1)
plot(t,x)
xlabel('time')
ylabel('Amplitude')
title('Modulating signal')
subplot(3,1,2)
plot(t,y)
xlabel('time')
ylabel('Amplitude')
title('Carrier signal')
subplot(3,1,3)
plot(t,s)
xlabel('time')
ylabel('Amplitude')
title('Frequency Modulated signal')