Question re Loren (on the Art of Matlab) Data Driven Fitiing
4 ビュー (過去 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 件)
Bjorn Gustavsson
2014 年 1 月 30 日
I managed to run through that example without problems in 2013a.
0 件のコメント
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 で Linear and Nonlinear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!