How to fix this error?

1 回表示 (過去 30 日間)
Nisar Ahmed
Nisar Ahmed 2020 年 11 月 9 日
コメント済み: Nisar Ahmed 2020 年 11 月 9 日
Hi
Dear all,
can you please help me to fix this error?
Index exceeds the number of array elements (9).
Error in Wavelet_freq (line 170)
figure(5), plot(wav10_30_50); ylabel('Amplitude'); xlabel('Time (s)');
What this error means?
  1 件のコメント
Nisar Ahmed
Nisar Ahmed 2020 年 11 月 9 日
I am simply loading and plotting this wavelet.
[wav10_30_50] = ReadRSS('wav10_30_50.rss');

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

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 11 月 9 日
編集済み: KALYAN ACHARJYA 2020 年 11 月 9 日
What this error means?
Index exceeds the number of array elements (9).
Example:
Suppose, an array example A=[2 3 4 5 6 7 8]; Here the array A length is 7. Now if you try to acess the array indices more than 7, then MATLAB reflects such error, as indices value exceeds array length.
for j=1:10
B=A(j)..
end
Till j=7, there is no issue, once the iteration reaches j=8 and try to access A(8) here j=8, as A has 7 array elements only, then it shows such error. Please check in your code, such issue may arrised.
  1 件のコメント
Nisar Ahmed
Nisar Ahmed 2020 年 11 月 9 日
Right Kalyan,
But see, I just loaded wav(10_30_50) and the length of wav is 5301.
[wav10_30_50] = ReadRSS('wav10_30_50.rss');
and then I hvae plotted as
plot(wav10_30_50); ylabel('Amplitude'); xlabel('Time (s)');
In that case why this error is appearing?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by