Question: This is a question in a MatLab coding class: Write a function, called multGauss, to compute the sum of multiple Gaussian (normal) profiles. See the

This is a question in a MatLab coding class:

Write a function, called multGauss, to compute the sum of multiple Gaussian (normal) profiles. See the figure here 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.

I don't even know where to begin so any help is appreciated! Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!