I would like to use the object "SpectrumAnalyzer", but rather than the graphical output, I don't know how to save the output of this object in matlab, after "step"ing it!
I have successfully achieved this simulink by recording the out of the Spectrum Scope and sending it back to Matlab, but I still have not figured out how to do this completely in matlab.
The "SpectrumAnalyzer" object webpage is: http://www.mathworks.co.uk/help/dsp/ref/dsp.spectrumanalyzerclass.html
Any help? can anyone do the following (the last step):
Fs = 100e6; % Sampling frequency fSz = 5000; % Frame size hsin = dsp.SineWave(1e0, 5e6, 0, 'SamplesPerFrame', fSz, 'SampleRate', Fs); hsb = dsp.SpectrumAnalyzer; hsb.SampleRate = Fs; hsb.SpectralAverages = 1; hsb.PlotAsTwoSidedSpectrum = false; hsb.RBWSource = 'Auto'; hsb.PowerUnits = 'dBW'; hsb.Position = [749 227 976 721]; y1 = step(hsin); output= step(hsb,y1);
I would be very grateful for an answer from some Matlab engineer.