- Item one In the menu bar of the Spectrum Analyzer window, select "View" and then "Spectrum Settings". Then, you will see a new panel showing up.
- Item two Under the Main options, you can change the value of RBW (Hz) to increase the samples/update. The default value is "Auto". A smaller number gives a larger samples/update.
How to use SpectrumAnalyzer for an entire signal
4 次查看(过去 30 天)
显示 更早的评论
Hey all! I have a file from GNU Radio containing a signal which I want to process ( image below in time domain).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190548/image.jpeg)
I want to use the SpectrumAnalyzer function of DSP Matlab toolbox to simplify the work (instead of doing myself all the digital processing) but this function only plots me the first 1536 points.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190549/image.jpeg)
( Spectrum Analyzer output for only the first 1536 points)
I want to process all the entire signal because I'm interested in saving a peak power value from a frecuency tone which is intermitent.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190550/image.png)
( The central peak is the one I'm interested in)
Here you can see the code I have implemented:
close all
clear all
clc
data_input = read_complex_binary('pruebaBUENAcomplex4',Inf);
Fs = 1e6; % Sampling rate
Ts = 1/Fs; % Sampling time interval
n = length(data_input); % Number of samples
t = 0:Ts:(n * Ts)-Ts; % Sampling period
plot(t,data_input); % Plot the original curve in the time domain
object = dsp.SpectrumAnalyzer('SampleRate', 1e6);
step(object, data_input)
spectrumTable = getSpectrumData(object);
power_values = spectrumTable.Spectrum;
power_values = power_values{1,1};
freq_values = spectrumTable.FrequencyVector;
freq_values = freq_values{1,1};
plot(freq_values,power_values)
Any suggestion how could I do this with all the imported signal file?
Thank you so much in advance, Regards.
Alejandro
0 个评论
回答(1 个)
Yoke Peng Leong
2018-5-17
You can adjust the output length through the Spectrum Settings panel.
To do so:
You can read more about the RBW settings in this page:
It is under the Properties > Advanced section.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!