フィルターのクリア

Error in function ?

1 回表示 (過去 30 日間)
Willim
Willim 2019 年 2 月 10 日
編集済み: Willim 2019 年 2 月 11 日
when I run it I got the following error
Undefined function or variable 'TBack'.
Error in interp (line 18)
TBack;
Error in physio (line 10)
v=interp(t);
Error in testingfile (line 47)
p1=physio(t(i)+alfa);

採用された回答

Jim Riggs
Jim Riggs 2019 年 2 月 10 日
編集済み: Jim Riggs 2019 年 2 月 10 日
I think that the statement
TBack;
at the end of the interp function does not belong. Just delete it.
Here is another issue:
In your interp function, you cannot execute the loop for k=1 to length (t_test) because you are referencing element (k+1) this will cause you to have an "out of bounds" subscript error when k=length(t_test).
The loop should run for k=1 to length(t_test)-1
  7 件のコメント
Jim Riggs
Jim Riggs 2019 年 2 月 10 日
編集済み: Jim Riggs 2019 年 2 月 10 日
I just noticed that you commented out the condition
elseif t1 == 9
If you do this, then you should change the conditional on the next statement from
elseif t_test(k) <= t1 && t_test(k+1) > t1
to
elseif t_test(k) <= t1 && t_test(k+1) >= t1
otherwise, there is no defined action for t1 = 9.
Jim Riggs
Jim Riggs 2019 年 2 月 11 日
編集済み: Jim Riggs 2019 年 2 月 11 日
I'm afraid that I cannot help you if you do not like the results, since I do not understand the problem you are working.
But if I have been helpful, please accept my answer.
Perhaps you should clean up your code, and then post a new question showing the code and the results you are getting, and why you think it is not right (i.e. what is the expected result?). Maybe someone else knows about this particular type of problem.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by