
Introductory Circuit Analysis (13th Edition)
13th Edition
ISBN: 9780133923605
Author: Robert L. Boylestad
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Use the code to answer the matlab question
![clc;
clearvars;
% Read the file
[y, Fs]=audioread('106miles.wav');
N=length(y);
Nfft 2^nextpow2 (N);
dt=1/Fs;
t=0: dt:dt* (N-1);
y=transpose(y);
% Pad zeros
y_nfft=zeros(Nfft,1);
y_nfft (1:length(y)) =y;
% Calculate Power (time domain)
power_TDomainSignal=sum(y_nfft. ^2)/length (y_nfft);
disp(['Power (time domain):
num2str(power_TDomainSignal)]);
% FFT
Y=fft (y,Nfft)/Nfft;
% Calculate power (frequency domain)
power_FDomainSignal=sum(abs (Y).^2);
disp(['Power (frequency domain):
num2str(power_FDomainSignal)]);
% Delete DC
Y_NODC=Y;
Y_NODC (1)=0;
% IFFT
y2=ifft (Y*Nfft, Nfft, 'symmetric');
y2_NoDC=ifft (Y_NoDC*Nfft, Nfft, 'symmetric');
% Calculate RMS
RMSE_y2=rms(y_nfft'-y2);
RMSE_Y2_NODC=rms (y_nfft'-y2_NODC);
disp( ( 'RMS Error of Case 1:
disp( ( 'RMS Error of Case 2:
num2str(RMSE_y2_NODC)]);
'
num2str(RMSE_y2)]);
disp([ 'Mean of Original Siganl:
num2str(mean (y_nfft))]);
'](https://content.bartleby.com/qna-images/question/93bd34a5-239a-432c-9210-7c84248f4421/34d01822-26e8-4c27-9608-b0faddaccd98/13xctle_thumbnail.jpeg)
Transcribed Image Text:clc;
clearvars;
% Read the file
[y, Fs]=audioread('106miles.wav');
N=length(y);
Nfft 2^nextpow2 (N);
dt=1/Fs;
t=0: dt:dt* (N-1);
y=transpose(y);
% Pad zeros
y_nfft=zeros(Nfft,1);
y_nfft (1:length(y)) =y;
% Calculate Power (time domain)
power_TDomainSignal=sum(y_nfft. ^2)/length (y_nfft);
disp(['Power (time domain):
num2str(power_TDomainSignal)]);
% FFT
Y=fft (y,Nfft)/Nfft;
% Calculate power (frequency domain)
power_FDomainSignal=sum(abs (Y).^2);
disp(['Power (frequency domain):
num2str(power_FDomainSignal)]);
% Delete DC
Y_NODC=Y;
Y_NODC (1)=0;
% IFFT
y2=ifft (Y*Nfft, Nfft, 'symmetric');
y2_NoDC=ifft (Y_NoDC*Nfft, Nfft, 'symmetric');
% Calculate RMS
RMSE_y2=rms(y_nfft'-y2);
RMSE_Y2_NODC=rms (y_nfft'-y2_NODC);
disp( ( 'RMS Error of Case 1:
disp( ( 'RMS Error of Case 2:
num2str(RMSE_y2_NODC)]);
'
num2str(RMSE_y2)]);
disp([ 'Mean of Original Siganl:
num2str(mean (y_nfft))]);
'

Transcribed Image Text:Matlab problems:
Use the .wav (modified so the DC component is zero) file to generate a DSB-SC modulated waveform.
Use a carrier frequency of 25KHz.
Along with your code, turn in plots of the time domain signal and the frequency domain signal of the
modulated carrier. Scale the axis appropriately.
State your observations about the results.
Suggestions:
The .wav and the carrier wave vectors need to be the same length and must keep a relative time
alignment; that is, have the sample interval. The matlab command 'resample' can be used to add points
(up sample) the .wav file. That is, resample can be used to change the effective sample interval of the
original file.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- TRA Ans: 385 For Pinite support signal x [n] =n[n](w[] _ 4[n-11] where r[w] is the discrete time. -? ramp fonction, the energy of xin]arrow_forward(B): Design a Moore FSM to detect the sequence (00) using T-FFs. Q4/ (A): Design a Mealy FSM for odd parity generator using JK-FFs.arrow_forwardDecoder circuit as shown in the following Figure. if A is LSB and C is MSB, the output expression F= YO Y Y, Y, D. Y. Decoder O a. B' O b. C O'c.B O d. Carrow_forward
- 3. Some GPS receivers use 1 bit ADCS (Analog-to-digital Converters) to sample and quantize the signal i.e. the output of the ADC is simply 2 quantization levels: -1 or +1. This is typically done to save on power. (a) What is the quantization SNR? How does it compare to typical thermal noise SNR of a GPS signal before correlating with the CDMA code? (b) Justify, how come it is possible to sample the signal using a single bit and still get good performance.arrow_forwardA PCM based system uses Companding. Is Companding introduced because: Select one: O a. O b. Noise has more effect on low signal levels than on large signal levels, and Companding helps to reduce this. Human speech is very random AWGN noise is removed by Companding C. Noise from quantisation is removed by Companding O d.arrow_forwardDetermine the binary values for which the following SOP expression is equal to 1: XYZ + XYZ + XYZ + XYZ + XYZ Is this a standard SOP expression?arrow_forward
- Perform the following functions:a. What will be the parity of the data signal to send as even parity:10100111001b. (0101)BCD = (---?---)2 = (---?---)Excess-3 = (---?---)Grayc. How to represent following numbers in signed representation:1. (-78)102. (-19)10arrow_forwardProblem 1(a). Given the BIT circuit helow determine the voltages at the base and collector, and Ihe currents at the base and emitler. Assume 8- 120. (10 poinis) 15V R-6k Ru:- 90k lu Va Ra 45k Re- 4k Ans. Va In- Ve- Problem 1(b). Using the same circuit given in Problem 1, assume B= z (infinity). calculate the collector voltage and emitter curent. (S points) Ars. Ve=arrow_forwardIn this chapter we proved that aliasing occurs when an analog signal is discretized.Can aliasing occur with purely analog signals? In other words, suppose we have apurely analog circuit (as opposed to a digital computer; you could call such a circuitan analog computer). Is it possible for aliasing to occur in this case? If so given anexample? If not provide a proofarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Introductory Circuit Analysis (13th Edition)Electrical EngineeringISBN:9780133923605Author:Robert L. BoylestadPublisher:PEARSONDelmar's Standard Textbook Of ElectricityElectrical EngineeringISBN:9781337900348Author:Stephen L. HermanPublisher:Cengage LearningProgrammable Logic ControllersElectrical EngineeringISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
- Fundamentals of Electric CircuitsElectrical EngineeringISBN:9780078028229Author:Charles K Alexander, Matthew SadikuPublisher:McGraw-Hill EducationElectric Circuits. (11th Edition)Electrical EngineeringISBN:9780134746968Author:James W. Nilsson, Susan RiedelPublisher:PEARSONEngineering ElectromagneticsElectrical EngineeringISBN:9780078028151Author:Hayt, William H. (william Hart), Jr, BUCK, John A.Publisher:Mcgraw-hill Education,

Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:PEARSON

Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning

Programmable Logic Controllers
Electrical Engineering
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education

Fundamentals of Electric Circuits
Electrical Engineering
ISBN:9780078028229
Author:Charles K Alexander, Matthew Sadiku
Publisher:McGraw-Hill Education

Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:9780134746968
Author:James W. Nilsson, Susan Riedel
Publisher:PEARSON

Engineering Electromagnetics
Electrical Engineering
ISBN:9780078028151
Author:Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:Mcgraw-hill Education,