フィルターのクリア

How to use spectrum analyzer object to show a signal waveform ?

1 回表示 (過去 30 日間)
Claudia
Claudia 2016 年 9 月 12 日
回答済み: Honglei Chen 2016 年 9 月 12 日
I am using the function SpectrumAnalyzer. How do I use it with a waveform?
Fs = 2500; Sineobject1 = dsp.SineWave('SamplesPerFrame',1024,'SampleRate',Fs,'Frequency',100); Sineobject2 = dsp.SineWave('SamplesPerFrame',1024,'SampleRate',Fs,'Frequency',1000); SA = dsp.SpectrumAnalyzer('SampleRate',Fs,'NumInputPorts',2,'PlotAsTwoSidedSpectrum',... false,'ChannelNames',{'SinewaveInput','NotchOutput'},'ShowLegend',true);

採用された回答

Honglei Chen
Honglei Chen 2016 年 9 月 12 日
You can set FrequencyResolutionMethod to 'Window length' to manually adjust the length of signal used to compute the spectrum, e.g.,
Fs = 2500;
Sineobject1 = dsp.SineWave('SamplesPerFrame',1024,'SampleRate',Fs,'Frequency',100);
Sineobject2 = dsp.SineWave('SamplesPerFrame',1024,'SampleRate',Fs,'Frequency',1000);
SA = dsp.SpectrumAnalyzer('SampleRate',Fs,'NumInputPorts',2,'PlotAsTwoSidedSpectrum',...
false,'ChannelNames',{'SinewaveInput','NotchOutput'},'ShowLegend',true,...
'FrequencyResolutionMethod','WindowLength');
step(SA,step(Sineobject1),step(Sineobject2))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by