Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Workaround for the norminv function in statistics toolbox

Asked by Kyle Bryenton

Kyle Bryenton (view profile)

on 19 Jul 2013

I am working on some image processing software and to get rid of the background noise in the pictures I am working with, it was suggested I use the following code. I found that it worked, however the computer I want to process these images on does not have the statistics toolbox which contains the norminv function. I was wondering if there is a way to work around using that particular function

Here is what my code currently looks like:

im=rgb2gray(imread(input('What picture would you like to input: ','s')));





Any suggestions?


Kyle Bryenton

Kyle Bryenton (view profile)


No products are associated with this question.

1 Answer

Answer by Wayne King

Wayne King (view profile)

on 19 Jul 2013
Edited by Wayne King

Wayne King (view profile)

on 19 Jul 2013
Accepted answer

You can use the inverse complementary error function. You'll have to convert from a nonstandard normal distribution, but that should not be hard.

If you are dealing with the standard normal, N(0,1), then

p = 0.9;

is equal to


If you have a Gaussian distribution other than the standard normal

    mu = 1;
    sigma = 4;
    p = 0.9;



1 Comment

Kyle Bryenton

Kyle Bryenton (view profile)

on 19 Jul 2013

Thank you I will give it a try :)

Wayne King

Wayne King (view profile)

Contact us