norminv matlab function in c++

Feb 14, 2012 at 8:17am
require c++ code for norminv matlab function
Normal inverse cumulative distribution function
Feb 14, 2012 at 8:55am
Tell us what the function do, I've not used matlab yet
Last edited on Feb 14, 2012 at 8:56am
Feb 14, 2012 at 8:59am
norminv

Normal inverse cumulative distribution function


X = norminv(P,mu,sigma)

computes the inverse of the normal cdf using the corresponding mean mu and standard deviation sigma at the corresponding probabilities in P.
Feb 14, 2012 at 9:30am
Feb 15, 2012 at 5:00am
none of the c codes are functioning properly
Feb 15, 2012 at 5:24am
closed account (o1vk4iN6)
Are you trying to write C++ code to put in matlab or what are you trying to do? Normally any C code shouldn't have a problem compiling with a C++ compiler, look at the code, see how it works and try to create your own function from it.
Feb 15, 2012 at 5:54am
i tried to comple ltqnorm.c writing main.c in visual studio
it gets compiled and executes also. but the problem is it is returning only the lower bound value, but matlab norminv function returns 2 values lower bound value and upper bound value
Feb 15, 2012 at 6:27am
got it
ltqnorm is working for single bound at a time. when u give one value the function returns one value.

whereas norminv of matlab takes an array of 2 and returns an array of 2.

when i tried giving each value of the array at a time i get lower or upper bound accordinglt.

thank u so much for all the help

now my problem is with finding eigen vectors , cholesky decomposition functions in c / c++
Feb 15, 2012 at 9:49am
It is not easy to code the eigen system problem, first you need to compute the characteristic polynimal of the matrix, then solve the equation, then solve the linear system for each single eigen value , and than you get eigen vectors. It is a long process, try to find a c++ library that does such thing. Cholesky decomposition algorithm is not stable, even if you find a solution in c++, you still need to do same extra work...
Last edited on Feb 15, 2012 at 9:49am
Feb 15, 2012 at 12:47pm
i have lapack library with eigen function dgeev got the main file calling this function from following link

http://software.intel.com/sites/products/documentation/hpc/mkl/lapack/mkl_lapack_examples/dgeev_ex.c.htm

but the program is giving following linking errors

error LNK2001: unresolved external symbol "void __cdecl dgeev_(char *,char *,int *,double *,int *,double *,double *,double *,int *,double *,int *,double *,int *,int *)" (?dgeev_@@YAXPAD0PAHPAN1222121211@Z)
Debug/test_matdiv.exe : fatal error LNK1120: 1 unresolved externals


Feb 15, 2012 at 4:05pm
I would go to sourceforge and search for an easy to use matrix c++ library
Last edited on Feb 15, 2012 at 4:32pm
Feb 15, 2012 at 6:55pm
Feb 16, 2012 at 7:01am
got it thank u for all the help

matlab chol uses the the LAPACK subroutines DPOTRF (real) and ZPOTRF (complex).

matlab eigen function uses LAPACK subroutine DSYEV for Real symmetric A


now i would like to get quantile plot of this data





Topic archived. No new replies allowed.