norminv matlab function in c++

require c++ code for norminv matlab function
Normal inverse cumulative distribution function
Tell us what the function do, I've not used matlab yet
Last edited on
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.
none of the c codes are functioning properly
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.
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
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++
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
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


I would go to sourceforge and search for an easy to use matrix c++ library
Last edited on
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.