Question re Loren (on the Art of Matlab) Data Driven Fitiing
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I´m using Loren's mylowess.m matlab code in MATLAB 2013a version. The thing is that I keep on getting the following error when I write exactly the same example that are on your post Data Driven Fitting:
Error using crossval>evalFun (line 480)
The function '@(train,test)norm(test(:,2)-mylowess(train,test(:,1),spans(j)))^2' generated the following error:
Undefined function or variable 'X'.
Error in crossval>getFuncVal (line 497)
funResult = evalFun(funorStr,arg(:));
Error in crossval (line 343)
funResult = getFuncVal(1, nData, cvp, data, funorStr, []);
Error in prueba_mylowess (line 60)
sse(j) = sum(crossval(f,[X,noisy],'partition',cp));
But when I use an older version of MATLAB (v.2011b) everything goes fine. Are there any changes in crossval code or in horzcat code?? why it is not working in the Matlab´s new version??
Waiting for your reply and thank you very much
Laura
0 个评论
回答(2 个)
Sean de Wolski
2014-1-30
Run:
dbstop if error
And then run the erroring code. This will stop with the debugger on the offending line and you'll be able to see where you are which will help you identify why X is not defined.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Speed Up Statistical Computations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!