フィルターのクリア

How to omit pictorial presentation of Scalogram?

1 回表示 (過去 30 日間)
Hamed Majidiyan
Hamed Majidiyan 2022 年 5 月 24 日
コメント済み: Image Analyst 2023 年 9 月 21 日
Dear all,
I would appreciate if anybody can give me a hand regarding the following issue. I have written a function to derive scalogram for every time steps of data, however it keeps showing every scalogram figure in a loop and I want to get rid of figure presentation. The following is my code, and I would be grateful if you tell me how to fix it to close the scalogram windows.
function A=CWTPIC(B)
global nsize
Fs = 50;
fb = cwtfilterbank('SignalLength',nsize,...
'SamplingFrequency',Fs,...
'VoicesPerOctave',12);
sig = B;
[cfs,frq] = wt(fb,sig);
t = (0:nsize-1)/Fs;
A=figure;pcolor(t,frq,abs(cfs));
set(gca,'yscale','log');
shading interp;axis off;
iptsetpref('ImshowBorder','tight');
end

回答 (1 件)

Sarthak
Sarthak 2023 年 9 月 15 日
Hi Hamed,
I understand you want to close the plot generated after every loop iteration.
You can achieve this by making use of MATLAB's figure handles and closing figures as needed within your loop.
You can refer to the documentation of “close” and can make use of it in your code.
Hope this solves your query.
  2 件のコメント
Hamed
Hamed 2023 年 9 月 20 日
Thanks so much it worked.
Image Analyst
Image Analyst 2023 年 9 月 21 日
If this Answer solves your original question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points.

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

カテゴリ

Help Center および File ExchangeFilter Banks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by