analysis using wavelet coherence

i want to perfom rossby wave detection using the wavelet coherence, but when i running the code there is always an error that says "error in wt.m time must be constant". when i change the year in the first clumn to numbers, the code runs. but when I include the first column as the years, the error massage appears. My data consists of 20 years,is there something wrong with my data?

5 件のコメント

nick
nick 2024 年 9 月 30 日
Hi Sitti,
Kindly share the relevant code file, "wt.m", using the paperclip icon. The code will help in identifying the function related to the error.
Sitti Nur Zayanti
Sitti Nur Zayanti 2024 年 9 月 30 日
Hai,
Here is the wt.m file, could you help me identify where my mistake is? I have also included the error message I received below. There is something wrong with the time in my research, but I don’t know where the issue lies.
Error using formatts (line 59)
Time step must be constant.
Error in wt (line 62)
[d,dt]=formatts(d);
Error in script_analisis_wavelet (line 12)
wt(d1);
nick
nick 2024 年 10 月 1 日
Hi Sitti,
It seems that function 'formatts' function is user-defined. Kindly please share all the relevant files.
Sitti Nur Zayanti
Sitti Nur Zayanti 2024 年 10 月 1 日
hi nick,
I also experienced the same issue as shown in the image you sent when running my data. Coincidentally, the relevant script file is from the wavelet coherence, and I am using wtcdemo as the main script.
Here is the file, if the time column is replaced with regular numbers. This is what confuses me about the ‘formatts’ function.
nick
nick 2024 年 10 月 3 日
Hi Sitti,
In the 'wtcdemo' file, it seems that 'boxpdf' is a user-defined function.
I am unable to reproduce the error, "error in wt.m time must be constant", due to the absence of code related to the custom functions. Could you kindly share the 'formatts' function file? You can use the following command in the MATLAB command window to find where the file is located:
which formatts %where formatts is the name of .m file

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAI for Signals and Images についてさらに検索

製品

リリース

R2014b

質問済み:

2024 年 9 月 30 日

コメント済み:

2024 年 10 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by