Discrete Matlab Filter Implementation

Assignment Help MATLAB Programming
Reference no: EM133127790

Assignment

PART A: Discrete Matlab Filter Implementation

Design in Matlab a discrete implementation for a mean (smoothing) and respectively median filter. Discrete implementation means that you are expected to implement the filter algorithms/functionality in Matlab from scratch using basic syntax, rather than using one of the already built-in Matlab filter functions, similar to the example provided here: "Matlab Examples" → "12. Prewitt, Sobel, and Roberts Gradient Operators" → "Gradient_filtering_discrete_example.m" which you can find on Blackboard in the Assignment folder.

Your code should reside in a Matlab script (.m file) which can be easily run by just calling its name from the Matlab's command window. Again, this .m file should be a Matlab script not a function.

Your two filters should be able to take as an input a small matrix provided by the user in the early part of the code, as shown in the example referred to above. Your code should be flexible enough to allow the user to provide as an input a matrix of any size they want, and still run correctly without having to manually adjust any indexes in the remaining code. The filter window size for both filters is3x3.

Your filter should be able to operate with and respectively without padding, via a user modifiable parameter included in your m-file called "padding". If padding = 0, your filter should operate without padding. When padding = 1 your filter should use padding by zeros, and if padding = 2 your filter should use padding by replication.

The filtered results for both filters should be suitably displayed in the Matlab command window when the code is run. Test your code with the following input matrix and provide the results in your report for all three types of padding, for each of the twofilters:

2

8

0

2

4

4

4

0

0

2

2

0

4

6

6

0

4

8

6

6

6

4

4

9

1

9

1

2

2

3

4

4

Make sure that you use good programming practice by suitably commenting the Matlab code from your .m file script where useful to do so, and by using appropriate code indentation in order to make reading your code more legible.

Reference no: EM133127790

Questions Cloud

Discuss the main hr issues facing organisations : Critically present and discuss the main HR issues facing organisations at the present time and critically discuss how these can be addressed by HR departments
By failing to prepare you are preparing to fail : Benjamin Franklin once quoted, "By failing to prepare, you are preparing to fail."
Project management tools-defining-planning and controlling : Apply project management tools and a PM outline type of your choice to structure and plan the project by defining, planning, and controlling.
Differences between internal and external audit : Explain the difference between the Straight-Line Method and the Reducing Balance Method of depreciation, illustrating briefly the impact of each method would
Discrete Matlab Filter Implementation : Discrete Matlab Filter Implementation - Make sure that you use good programming practice by suitably commenting
Develop strategic plan to create new small business : Develop a strategic plan to create a new small business.
Covid-19 impacted organizational behavior : What has been your experience with organizational behavior? How has COVID-19 impacted organizational behavior?
Laws and regulations impact global trade : How can small businesses take advantage of globalization opportunities? How can laws and regulations impact global trade?
Interest rates and stock valuation-risk and returns : Describe two to three macroeconomic factors that influence interest rates in general. Explain the effects of each factor on interest rates.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd