how to edit mnrfit?

6 views (last 30 days)
Mr M.
Mr M. on 30 Jul 2015
Commented: manoj bhatt on 21 Jan 2020
I would like to change the max iterations in mnrfit. So I copied the mnrfit.m file, and simply edit the following line: iterLim = 100; The new line is iterLim = 50; This is the only change in the file, and rename the function to mnrfit2, and rename the file mnrfit2.m. I tried to use my new mnrfit50 function in the same situation as mnrfit is used, however the following error occurs, why?
Undefined function 'stattestlink' for input arguments of type 'char'.
Error in mnrfit50 (line 146) [flink,dlink,ilink] = stattestlink(link,dataClass);
  2 Comments
Steven Lord
Steven Lord on 10 Sep 2015
Why do you want/need to change the maximum number of iterations?
manoj bhatt
manoj bhatt on 21 Jan 2020
I am also encountering the same problem. When I increase the dimensionality of data then max iteration related problem occurs.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 31 Jul 2015
stattestlink is a function that is private to the implementation of mnrfit, in a directory named 'private' relative to the location of mnrfit. Your version, being outside that directory, does not pick up that implementation.
  4 Comments
Mr M.
Mr M. on 10 Sep 2015
It is not possible to use something like this: optimoptions(@mnrfit,'MaxIter',50) ?
Star Strider
Star Strider on 10 Sep 2015
The mnrfit function does not accept an options structure.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!