Apply a threshold on a structure

2 ビュー (過去 30 日間)
Aurore Lanoix
Aurore Lanoix 2016 年 6 月 6 日
コメント済み: Walter Roberson 2016 年 6 月 7 日
Hi, I have 3 components which are struct type and I would like to apply a threshold using wthresh. My problem is that wthresh function doesn't accept a struct in input parameter. How can I do that ? Thanks for your answers
  1 件のコメント
Guillaume
Guillaume 2016 年 6 月 7 日
A structure is simply a container for several variables (the fields of the structure). 'Thresholding a structure' does not mean anything. So, you need to be clearer about what you want to do.
You may want to threshold all the fields of the structure, or just one (which one?).

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

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 6 月 6 日
structfun(), probably with 'Uniform', 0
  2 件のコメント
Aurore Lanoix
Aurore Lanoix 2016 年 6 月 7 日
I don't really understand how structfun() works. I have my Component which is a struct, I do
structfun(wthresh(Component1,'s',T),'UniformOutpout',false);
But it always the same problem, "Undefined function 'abs' for input arguments of type 'struct'." Thanks for your answer
Walter Roberson
Walter Roberson 2016 年 6 月 7 日
structfun(@(field) wthresh(field, 's', T), Component1, 'Uniform', 0)

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

Community Treasure Hunt

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

Start Hunting!

Translated by