norminv not working

조회 수: 13 (최근 30일)
Stephen Westland
Stephen Westland 2011년 12월 16일
I just added the statistics toolbox to my MATLAB installation. I want to use the norminv function. Today I upgraded from 2011a to 2011b but adding the statistics toolbox.
However, when I call norminv, e.g. norminv(0.5) I get the error message
Undefined function 'stdnormal_inv' for input arguments of type 'double'.
Error in norminv (line 54) inv = m + s .* stdnormal_inv (x);
My guess it is something to do with the path. However, the statistics toolbox is in the path. When I type help norminv I get the help information. When I type which norminv I get
/Users/westland/Documents/MATLAB/norminv.m
which is a bit strange because norminv.m is not in this directory.
Any help would be greatly appreciated.

답변 (1개)

Sean de Wolski
Sean de Wolski 2011년 12월 16일
It means that you wrote your own norminv or downloaded a norminv. Rename the norminv at /Users/westland/Documents/MATLAB/norminv.m to something else and then it should work.
which -all norminv
would show the real one too.
  댓글 수: 2
Stephen Westland
Stephen Westland 2011년 12월 16일
Thanks.
This shows
/Users/westland/Documents/MATLAB/norminv.m
/Applications/MATLAB_R2011b.app/toolbox/stats/stats/norminv.m % Shadowed
I feel a bit stupid. I remember now, trying to write my own norminv.m ages ago. I deleted it and now everything works fine. Many many thanks
Steve
Sean de Wolski
Sean de Wolski 2011년 12월 16일
Great! Please accept this answer to mark this thread closed.

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

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by