how can i show up to 6 periods of this signal only, while being able to see the top and bottom of the wave?

1 回表示 (過去 30 日間)
(the "signal was recorded with a sampling frequency of 22050Hz)
The MATLAB code:
t = 1:length(clarinet);
plot(t,clarinet)
xlabel('index t')
ylabel('Amplitude')

採用された回答

William Rose
William Rose 2023 年 2 月 13 日
Nice answer from @Les Beckham.
Or, if you simply want to change the x-axis range, you can do
xlim([0 0.01]);
after the plot command. Change 0.01 to a different value, as you prefer.
If you mean "How can I automatically determine the dominant frequency, and then plot 6 cycles", I suggest you make a separate question. Good luck!
  1 件のコメント
Walter Roberson
Walter Roberson 2023 年 2 月 13 日
I notice that it is apparently a recording of a clarinet. The implication is that although there might be dominent frequences for particular periods of time, that "6 periods" of the entire unfiltered signal is probably not really defined. (The more dominent frequencies you want to deal with simultaneously, the longer the plot you would need to have 6 complete periods of the composite signal.)

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

その他の回答 (1 件)

Les Beckham
Les Beckham 2023 年 2 月 13 日
Check out this section of the documentation: zoom xon
This can also be done interactively but it is harder to explain. See this doc page: here

カテゴリ

Help Center および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by