Setting PeriodLimits with wcoherence

2 ビュー (過去 30 日間)
Jakub Sliwinski
Jakub Sliwinski 2021 年 2 月 28 日
コメント済み: Jakub Sliwinski 2021 年 3 月 3 日
Hello,
I am using MATLAB 2019a, and I have a problem with the wcoherence function. I want to restrict my model to certain periods, so I have the following:
wcoherence(x,y,seconds(8),'PeriodLimits',[seconds(30) seconds(100)])
Where x and y are my vectors, 8 is the sampling period, and I want to just look at periods between 30 and 100. I get an error:
"Error using wcoherence
Expected PhaseDisplayThreshold to be one of these types:
numeric
Instead its type was duration.
Error in wcoherence>parseinputs (line 275)
validateattributes(params.mincoherence,{'numeric'},{'scalar','>=',0,...
Error in wcoherence (line 96)
params = parseinputs(numel(x),varargin{:});"
But when I include the 'PhaseDisplayThreshold' argument with a arbirary value of 0.1, the function ignores the 'PeriodLimits' argument and reverts to displaying Frequency on the y axis. I don't want to simply trim the axis to the periods I want to display, because I don't want the periods outside of my region of interest to saturate the powers of the other periods. (Also, I should mention I've thoroughly read the help topics and have been playing around with this for some time now!)
Any help is greatly appreciated!

採用された回答

Urmila Rajpurohith
Urmila Rajpurohith 2021 年 3 月 3 日
Hi
I am assuming that you are working with MATLAB 2019a general release.
The reason behind the above error is :The name value pair "Period Limits" which you are using in your code is not supported in 2019a.
Refer to the below documentation on "wcoherence" to get more details on the list of name value pairs supported for 2019a:
And If you want to use "Period Limits" update your MATLAB.
Hope this helps!
  1 件のコメント
Jakub Sliwinski
Jakub Sliwinski 2021 年 3 月 3 日
Thanks for the quick response! Indeed, I had read the help topic you sent, and saw that it was introduced in 2016, which is why I confused that my 2019 version did not work.
I have since updated by MATLAB, and everything works now!
Thanks again!
J

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by