In Telecommunication Industry and signal processing Modulation is used to carry information with the help of a carrier signal wave.Common example is FM (frequency modulation ) which is mostly used for broadcasting music and speeches on radio So in modulation analog information in converted into digital and then this information is transmitted and then when this information is received at the receiver it’s demodulated and in this way information is transmitted with an efficient use of bandwidth.Now in Demodulation the information is restored by reversing the mechanism which we used in modulation.
Computer modem is used for modulation and demodulation.Basic idea is that computer generates a sequence of 1’s and 0’s from the information which is to be modulated because computer just understand binary language so this information is modulated and converted into light waves and then transmitted over optic fiber and when its reaches destination light waves are demodulated by modem and information is passed to the destination.
- First Record object and do Sound recording for 5 seconds.
- Save the recorded sound in .wav format using wavewrite.
- Read the saved .wav sound using waveread command.
- Now Construct a carrier using this Eq A*cos(2*pi*f*t)
- Where A=Amplitude f=Sampling Frequency and t = time
- Now use linspace command to generate time where t=linspace(a,b,n )generates t row vector of n point linearly between a and b.
- Now modulate by multiplying carrier with data and then play sound to listen modulated data.
- Now Demodulate Data is the same way and play the sound to listen the sound
- Now at last Graph is Plotted.
recObj = audiorecorder;
fprintf(‘Press any key to start %g seconds of recording… \n’, duration); pause
fprintf(‘\n Finished recording. \n’);
myRecording = getaudiodata(recObj);
fprintf(‘\n Press any Key to listen to Recording %h.’, myRecording); pause
fprintf(‘\n Playing… \n’);
fprintf(‘\n Press any key to save the sound data to %s…’, waveFile); pause
fprintf(‘\n Saved.. \n’);
[y, fs, nbits]=wavread(‘project.wav’); % find out sampling rate,
disp(‘ Press any Key to Listen to Modulated Voice’); pause
disp(‘ Press any Key to Listen to Demodulated Voice’); pause
fprintf(‘\n Press any Key to Display the Signals. \n’); pause
xlabel(‘Time’); ylabel(‘ signal’);
Like , share this post on Facebook , Twitter by using left moving Social Sharing block and follow us on Facebook Page , Twitter and do comment and enter your email. After you have done you will automatically get source code in your mail. Note : This will be auto generated mail you can’t get until you follow above method.
Related Projects : Optimum Global Thresholding Using Otsu’s Method Matlab Source Code.