Error using hilbert transform: "Subscript indices must either be real positive integers or logicals."

1 回表示 (過去 30 日間)
F Z
F Z 2015 年 10 月 2 日
編集済み: Stephen23 2015 年 10 月 3 日
Hello,
I have some troubles using hilbert transform for the enclosed vector in a guide.
The used command is:
y=abs(hilbert(A))/max(abs(hilbert(A)))
but Matlab sends the following error: "Subscript indices must either be real positive integers or logicals."
I can't understand why am i getting this error because i have already used this command in a former program successfully.
Any ideas please?

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 10 月 2 日
You accidentally assigned to a variable named "hilbert", which has the effect of overriding the meaning of hilbert() as a routine.
  8 件のコメント
Walter Roberson
Walter Roberson 2015 年 10 月 2 日
We see this all the time. If it had been a case where the toolbox was not installed then the message would be about unknown variable or function.

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

カテゴリ

Help Center および File ExchangeHilbert and Walsh-Hadamard Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by