Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Other Engineering Expert

PURPOSE

The purpose of this laboratory is to design and implement a routine that will resample (upsample and/or downsample) a sequence.

ASSIGNMENT

1. Answer in writing all the questions in the "Some questions" sections of the Downsampling and Upsampling links, above.
2. Write a MATLAB function, named resample, which has the following first lines:

function y = resamp(x, r)
% RESAMP Resample an input sequence x by a factor of r
% to produce an output sequence y by a combination of upsampling and downsampling.
% For example,
% y=resamp(x,1.5);
% will upsample x by 3 and downsample by 2.

o x is just an plain-vanilla array, not one of our Matlab sequence structures.

o You may want to look at the MATLAB function rat, which tries to express a rational number (such as the resampling parameter, r) as the ratio of integers.

o You may use the MATLAB functions fir1, filter and/or kaiser, to make your Kaiser filter only.

o Obviously you may not use the MATLAB resample, decimate, or interpolate functions. However, you should feel free to use these functions to check your resamp function. You should read about making the Kaiser filter here.

o You will want to make sure that the bandwidth and gain of your Kaiser filter are correct, given the value of your resampling parameter, r.

o You may use MATLAB's conv routine if you wish.

3. Test your resamp against MATLAB's resample function. Since MATLAB's resample function may use a different lowpass filter, we can't simply compare point by point.

However, we can look at the output of the two functions for a simple sinusoidal input to see that it does the right thing. Here is a small program called test_resamp to do just that. What test_resamp does is to take an input sequence and plot the first few points resampled by a given factor using both Matlab's resample function and your test_resamp function. To use test_resamp, just put it in the directory with your resamp function, and run it. For example, to test upsampling of a little sin sequence by a factor of two, just do this:

>> x = -sin(2 * pi * (0:10) / 4);

>> test_resamp(x, 2);

1444_resamp function.png

The output of your resamp function is in blue and the output of matlab's resample function is in red. They should match very well. You can do help test_resamp to find out the other arguments of the function.

4. Test your resamp function by upsampling or downsampling a segment of speech. You can get this sample in several ways:

o Take my speech sample, seashell .wav, which we played earlier.

o Find another . wav file on the net

o Record your own . wav file.

5. Once you have a .wav file, read the data into your program using MATLAB's wavread function.

6. Resample x to some other, non-integer rate, using your resamp function: y = resamp(x, 1.5);

7. To check that you resampled correctly, playback the resampled signal using the ,,oundsc function at the new sample rate, for example: soundsc(resamp(x, 1.5), 1.5 * fs);

The resampled function should sound very similar to the original function, at least if it is upsampled.

8. You should download the following file and put it in your directory : lab5.m. Then type publish lab5, print the output, and submit it.

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M91521085
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in Other Engineering

Projectflow processing of liquor in a mineral refining

Project Flow Processing of Liquor in a Mineral Refining Plant The aim of this project is to design a flow processing system of liquor (slurry) in a mineral (aluminum) refining plant. Aluminum is manufactured in two phase ...

Learning outcomes evaluate multiuser communication and

Learning Outcomes Evaluate multiuser communication and resource sharing techniques; Apply the techniques of, and report on, digital communication applications using Matlab and hardware devices. Assignment Description The ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

Engineering materials term paper assignment -conduct a

ENGINEERING MATERIALS TERM PAPER ASSIGNMENT - Conduct a thorough literature search and write a 15-20 page technical review paper on the evolution of the engineering materials used in the manufacturing of any one of the f ...

Engineering analysis assignment -for every problem provide

Engineering Analysis Assignment - For every problem, provide The MATLAB script/function files that solve the problems. Problem 1: Plot the function f(t) = (x+5) 2 /(4+3x 2 ) for -3 ≤ x ≤ 5. using plot command. Use the ar ...

1 online discussion forum - post your proposed topic and

1. Online Discussion forum - Post your proposed topic and chosen data set as well as a short plan for the project. This is required for approval of the topic. As discussed, students must select unique topics, therefore i ...

Mine safety amp environmental engineeringpart 1 questions1

Mine Safety & Environmental Engineering Part 1. Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the following terms ...

Question - show that the zero-point energy of a simple

Question - Show that the zero-point energy of a simple harmonic oscillator does not contribute to its entropy or heat capacity, but does contribute to its energy and Helmholtz function.

Assessment practical reportproduce a short technical report

Assessment: Practical Report Produce a short technical report in a form consistent with proteomic journals covering the techniques, results and interpretation of your proteomics experiment in the practical classes. The r ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As