Error with mvnrnd function?

조회 수: 10 (최근 30일)
Alexandra
Alexandra 2014년 9월 5일
댓글: Alexandra 2014년 9월 5일
Hi!
when I run the following code: n = 1000; rho = .7; Z = mvnrnd([0 0], [1 rho; rho 1], n); U = normcdf(Z); X = [gaminv(U(:,1),2,1) tinv(U(:,2),5)];
I get the following error:
??? Undefined function or method 'mvnrnd' for input arguments of type 'double'.
Error in ==> U3 at 3 Z = mvnrnd([0 0], [1 rho; rho 1], n);
seems like I don't have the function. When I do "exist mvnrnd" I get ans = 0.
I am using a 2005 version with the R2011a update. Do I have to installs all updates CDs I have form 2005 to 2011?
Thanks a lot.
------------------------------------------------------------------------------------- MATLAB Version 7.12.0.635 (R2011a) MATLAB License Number: 297946 Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1) Java VM Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot™ Client VM mixed mode ------------------------------------------------------------------------------------- MATLAB Version 7.12 (R2011a)

채택된 답변

C.J. Harris
C.J. Harris 2014년 9월 5일
The function mvnrnd is part of the statistics toolbox. Firstly, in order to use this function you have to have the Statistics Toolbox installed. This can be confirmed using the command:
ver
Secondly, you need to have a license for the Statistics Toolbox, this can be confirmed using the command:
license('test','Statistics_Toolbox')
  댓글 수: 1
Alexandra
Alexandra 2014년 9월 5일
Thanks a lot. I already requested a trial for statistics toolbox. Do you now how can I go around this function for multivariate copula generation until I get statistics toolbox? I am short on time, as always.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by