MATLAB: Undefined function or method ‘gaussian1D’ for input arguments of type ‘double’.

errorgaussian1dMATLABundefined function or method

I get this error when i simulate the code "y1 = gaussian1D(x, mu(1), sigma(1)); "Undefined function or method 'gaussian1D' for input arguments of type 'double'. please tell me how can i get its toolbox.

Best Answer

The function gaussian1D does not exist, therefore you cannot call it. If you are looking to get a sample from the 1D Gaussian distribution, use "randn" instead. Note that this is the N(0,1) distribution, so you need to fix it manually, e.g.
sample = mu + sigma*randn(1,1);
where mu is the mean and sigma the standard deviation.