MATLAB: Having problem with mvnrnd…

matlab beginnermvnrnd

i'm having problem with the mvnrnd.. its when i run the coding, it says "Undefined function'mvnrnd' for input arguments of type 'double'".. the coding is below..i don't know if i'm overlook at certain part..help me please.. i'm new to Matlab.
X1=mvnrnd(mu1,sigma,n1);

Best Answer

matlab is basically telling you that it can't find the function:
which mvnrnd
will probably result in: 'mvnrnd' not found
mvnrnd is part of the statistics toolbox, type 'ver' in matlab and see if you have it.
ver
% Stateflow Coder Version 7.6.1 (R2010bSP1)
% Statistics Toolbox <-- Version 7.4 (R2010bSP1)
% Symbolic Math Toolbox Version 5.5 (R2010bSP1)