error using robust option with nlinfit in matlab
Mostrar comentarios más antiguos
Hello,
I am trying to use the nlinfit function in matlab. I want to run a Robust regression. The documentation says that the syntax for this is
opts = statset('nlinfit');
opts.RobustWgtFun = 'bisquare';
beat0= [b0,b2]
beta = nlinfit(x,y,modelfun,beta0,opts)]
Should be very straightforward. However, when I try to run this, I get the error: Undefined function 'statrobustwfun' for input arguments of type 'char'. if I instead simply specify that I want the robust option and don't specify the specific weight function, i.e.
opts = statset('robust','on')
I get the same error.
Can anyone please tell me why this is happening?
Thanks, Paul
Respuestas (1)
Star Strider
el 19 de Mzo. de 2014
I don’t have a lot of experience with the nlinfit robust option, but according to the current online documentation, it looks as though you’re doing everything correctly. The only problem I see is:
beat0= [b0,b2]
so nlinfit isn’t getting an argument for beta0. I have no idea if that is the reason for the error.
Categorías
Más información sobre Linear Predictive Coding en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!