フィルターのクリア

Matlab app designer spectrogram

16 ビュー (過去 30 日間)
Jakub Tkaczyk
Jakub Tkaczyk 2023 年 4 月 18 日
コメント済み: Jakub Tkaczyk 2023 年 4 月 18 日
Hello, i need help with my spectrogram in my matlab app. I got one file that i read from audioread and i don't know how to proper create a spectrogram plot. Here is my code, and some notes: Fs=48000, lenght is about 400000+ for app.y.
[app.y,app.Fs]=audioread(app.Plik);
windows=hamming(512);
noverlap=256;
nfft=1024;
sp=spectrogram(app.y(:,1),window,noverlap,nfft,app.Fs,'yaxis')
plot(app.UIAxes3,sp)
can anyone explain me how to make proper values for every option? After this code the program is creating something like this attached to post. Where's the problem?

採用された回答

Kevin Holly
Kevin Holly 2023 年 4 月 18 日
N = 1024;
n = 0:N-1;
w0 = 2*pi/5;
x = sin(w0*n)+10*sin(2*w0*n);
Executing the spectrogram function with an output does not create a spectrogram.
s = spectrogram(x);
Running the function without the output opens up a figure window with a spectrogram.
spectrogram(x)
If you want this spectrogram to appear in your app, you could place it in a panel and the created figure window as such:
fig = figure;
spectrogram(x,'yaxis')
h = gca;
h.Parent = app.Panel;
delete(fig)
For an example, please see the app attached.
  2 件のコメント
Jakub Tkaczyk
Jakub Tkaczyk 2023 年 4 月 18 日
so with my value specified in this example this woould work like this?
i want to try this in next minutes
Jakub Tkaczyk
Jakub Tkaczyk 2023 年 4 月 18 日
it's opening me a Windows DEsigner which i dont understand what is going on

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime-Frequency Analysis についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by