Question

: The Root Mean Square of a discrete-time signal is given by We can easily calculate...

: The Root Mean Square of a discrete-time signal is given by

We can easily calculate the RMS of signals in MATLAB using a combination of the sum, sqrt, and ^ commands. N represents the number of samples of the signal. Please note that the command .^ applied to a vector squares each element of the vector.

Write a script to calculate the RMS of the discrete-time signal x, defined as follows: n = a vector of number between -23 and 45 with increments of 0.1.

x = (n/2 + n3)./100

There is a function that calculates the rms in matlab (rms) compare the results of your formula with that of the native function.

Homework Answers

Answer #1
n = [-23:0.1:45]   % creating a vector
x = (n/2 + n.^3)./100

% finding rms using conventional method
vs = sum(x.^2);
rms1 = sqrt(vs / (numel(x)+1))

% finding rms using matlab function
rms2 = rms(x)

As we can see that the inbuilt formula and conventional method only hold true until the decimal precision starts. Inbuilts formula gives the rms value slightly larger than the conventional method.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
SIGNALS AND SYSTEMS Experiment 1    Signal Generation Date: January 1-8, 2018 The purpose of this...
SIGNALS AND SYSTEMS Experiment 1    Signal Generation Date: January 1-8, 2018 The purpose of this laboratory is to familiarize you with the basic commands in MATLAB for signal generation and verify the generated signal. Objectives 1.Learn basic MATLAB commands and syntax, including help system. 2.Use MATLAB ( from Citrix) to generate and plot different signals. Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes...
Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1...
Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes labels with title. Generate and plot the function x2(t) = sin (30pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes labels with title. Generate and plot the combination function x3(t) = x1(t)*x2(t) as above. Use proper axes labels with title. Generate and plot the sum of two cosine waves   v1(t) =...
1. Write a MATLAB function to determine the discrete-time Fourier Transform (H(?)) of the following sequence....
1. Write a MATLAB function to determine the discrete-time Fourier Transform (H(?)) of the following sequence. Plot its magnitude and phase. You can use the dtft command and use the abs, angle and plot commands to plot the results. x(n) = {4, 3, 2, 1, 2, 3, 4}. 2. Analytically determine H(z) and plot its magnitude and phase for the following system using freqz. y(n) = 2x(n) + x(n ? 1) ? 0.25y(n ? 1) + 0.25y(n ? 2). 3....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT