Export Spectrum Analyser trace to workspace or file
Show older comments
Hi, as the title says, I want to find out how to export the trace (dBm) from a Spectrum Analyser, in Simulink, to either the workspace or preferably to an external (EXCEL spreadsheet) file ?
1 Comment
Derek Eccles
on 17 Mar 2020
Answers (1)
Fangjun Jiang
on 17 Mar 2020
Edited: Fangjun Jiang
on 17 Mar 2020
0 votes
Run this to open the document and example, I believe the answer can be found there. The key is probabaly the function getMeasurementsData()
web(fullfile(docroot, 'dsp/ref/dsp.spectrumanalyzer.getmeasurementsdata.html'))
or from https://www.mathworks.com/help/releases/R2019b/dsp/ref/dsp.spectrumanalyzer.getmeasurementsdata.html
8 Comments
Derek Eccles
on 17 Mar 2020
Derek Eccles
on 17 Mar 2020
Fangjun Jiang
on 17 Mar 2020
What are you trying to do with this? "sablock" is goint to have the same value as "fsk"
sablock = fsk, '/Spectrum Analyzer'
Open the html weblink, there is a model, there is a spectrum analyzer block, there are example code!
Derek Eccles
on 18 Mar 2020
Fangjun Jiang
on 18 Mar 2020
Then, it should be sablock='fsk/Spectrum Analyzer'. Or, click (once) the Spectrum Analyzer block in your model, go to Command Window, type "sablock=gcb" and you'll get the full path of the Spectrum Analyzer block. Then follow the example in the webpage.
I don't know why your previous post shows some numerical numbers.
Derek Eccles
on 18 Mar 2020
Fangjun Jiang
on 19 Mar 2020
Edited: Fangjun Jiang
on 19 Mar 2020
They all depend on your simulation data and setting.
If your model name is 'fsk.slx', then specifying the full path of the scope block should be scope='fsk/Spectrum Analyzer'. type "fsk" before and after the simulation to see what happened. "fsk" should just bring up your model.
Derek Eccles
on 19 Mar 2020
Categories
Find more on FSK in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!