필터 지우기
필터 지우기

Error in nlinfit function

조회 수: 16 (최근 30일)
Peyman Ghasemi
Peyman Ghasemi 2016년 2월 11일
댓글: Aaron Best 2019년 6월 3일
I want to execute a code to calculate Largest Lyapunov Exponent in time series. There is a "nlinfit" function in my m-file, but the result is this error:
Error using nlinfit (line 239)
No usable observations after removing NaNs in Y and
in the result of evaluating MODELFUN at the initial
value BETA0.
Error in lyaprosen (line 377)
beta =
nlinfit(K(1:Tl),L(1:Tl),@nonlin1,[betar;randn(1,1)]);
I searched this error, but there was not any results. Can anyone help me to solve this issue?
Thanks; Peyman
  댓글 수: 4
the cyclist
the cyclist 2016년 2월 14일
I was not able to run your code. I get the error
dist is not included in your installed products. These products offer 'dist':
Neural Network Toolbox
Error in lyaprosen (line 106)
Dmm=dist(EEMmm(:,1:k)');
I may still be able to help. If you halt your code just before the call to nlinfit [line 377 of lyaprosen], and save those variables into a *.mat file, then you could upload the file here and I could just load the variables and run the command.
Peyman Ghasemi
Peyman Ghasemi 2016년 2월 14일
I did it. Because the workspace variables was bigger than 5 MB (They are 7.5 MB!). I upload them on my Dropbox. please download it from this link:
The "lyaprosen" was a function and I hadn't access to variables, So I modified it to a m-file and a function. please load the files in your directory, then load the variables and go to line 377 of "lyaprosen.m".
Thank you very much.

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2016년 2월 15일
The immediate cause of the problem with nlinfit() is that your variables K and L are empty arrays. They are empty because Tl is an empty array as well.
You can trace this back to the fact that Ldiff is all NaNs, which is due to Lm being NaN, and so on. (That's as far as I went.)
I suggest you use the debugger to diagnose the ultimate cause.

추가 답변 (1개)

Peyman Ghasemi
Peyman Ghasemi 2016년 5월 26일
편집: Peyman Ghasemi 2016년 5월 26일
Finally I solved the problem! My signals had a low domain and they were changed to NaN in the process of the Lyapanov code! The solution is just multiplying the signal in a proper number.
  댓글 수: 1
Aaron Best
Aaron Best 2019년 6월 3일
Hi Peyman,
I am running into the same error could you please go into a little more detial about how you solved this problem?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by