Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function, called multGauss, to compute the sum of multiple Gaussian (normal) profiles. See the figure here (https://en.wikipedia.org/wiki/Gaussian_function) to illustrate what Gaussians of different

Write a function, called multGauss, to compute the sum of multiple Gaussian (normal) profiles. See the figure here (https://en.wikipedia.org/wiki/Gaussian_function) to illustrate what Gaussians of different locations, amplitudes and widths (standard deviations) look like. The function should itself call the function gaussmf (built-in matlab function) to do the basic calculation, returning only the sum (i.e., add together the individual Gaussian profiles). The function multGauss that you write should be able to handle any number of requested Gaussians (say 2, 4, 10, whatever). The easiest way to determine the number of requested Gaussians might be from the number of rows in an input (input to the function) matrix, beta, each of which contains the parameters of each component Gaussian. Include error checking to ensure that the input parameter matrix has three columns, returning an error if not. To clarify, the inputs to multGauss should be (i) an input matrix with three columns (see help on gaussmf; the third parameter is simply the amplitude (default is 1) of the Gaussian) for the parameters and at least one row (each row being an individual Gaussian; (ii) a vector x specifying the domain for the calculations. The output from multGauss is a vector that gives the sum of the Gaussians at each location x in the domain.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions