error when using mvncdf

2 views (last 30 days)
Huitian
Huitian on 19 Aug 2014
Answered: the cyclist on 19 Aug 2014
I am using mvncdf. Here is my code
xl=[-Inf,-Inf,-c1,-Inf,c0,-Inf,-Inf,-Inf,0];
xu=[-c1,Inf,c1,Inf,Inf,Inf,0,Inf,Inf];
mu=zeros(1,9);
sig is a 9 by 9 symmetric and positive definite matrix (checked that sig==sig')
When I tried to run
err=mvncdf('xl',xl,'xu',xu,'mu',mu,'SIGMA',sig);
an error msg popped out "Error using mvncdf (line 109) XL and XU must be matrices and have the same size.
Error in prob_err_gq_b (line 53) err=mvncdf('xl',xl,'xu',xu,'mu',mu,'SIGMA',sig);"
However I checked that EDU>> size(xl)
ans =
1 9
EDU>> size(xu)
ans =
1 9
what is the problem?

Answers (1)

the cyclist
the cyclist on 19 Aug 2014
Don't put quotes around the variable names in the inputs.

Tags

Community Treasure Hunt

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

Start Hunting!