{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MATLAB PRGMS - FSK clc 0or clearing the command window...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
FSK clc %for clearing the command window close all %for closing all the window except command window clear all %for deleting all the variables from the memory fc1=input( 'Enter the freq of 1st Sine Wave carrier:' ); %10% fc2=input( 'Enter the freq of 2nd Sine Wave carrier:' ); %30% fp=input( 'Enter the freq of Periodic Binary pulse (Message):' ); %5% amp=input( 'Enter the amplitude (For Both Carrier & Binary Pulse Message):' ); %4% amp=amp/2; t=0:0.001:1; % For setting the sampling interval c1=amp.*sin(2*pi*fc1*t); % For Generating 1st Carrier Sine wave c2=amp.*sin(2*pi*fc2*t); % For Generating 2nd Carrier Sine wave subplot(4,1,1); %For Plotting The Carrier wave plot(t,c1) xlabel( 'Time' ) ylabel( 'Amplitude' ) title( 'Carrier 1 Wave' ) subplot(4,1,2) %For Plotting The Carrier wave plot(t,c2) xlabel( 'Time' ) ylabel( 'Amplitude' ) title( 'Carrier 2 Wave' ) m=amp.*square(2*pi*fp*t)+amp; %For Generating Square wave message subplot(4,1,3) %For Plotting The Square Binary Pulse (Message) plot(t,m) xlabel( 'Time' ) ylabel( 'Amplitude' ) title( 'Binary Message Pulses' ) for i=0:1000 %here we are generating the modulated wave if
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}