error using robust option with nlinfit in matlab
이전 댓글 표시
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
답변 (1개)
Star Strider
2014년 3월 19일
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.
카테고리
도움말 센터 및 File Exchange에서 Linear Predictive Coding에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!