How to display a variable Receiver Antenna's Gain value onto the Spectrum Analyzer in Matlab Simulink?

3 views (last 30 days)
Dear Sir,
i have a problem in displaying a variable's value , named Gr onto the Simulink's Spectrum Analyzer
This variable Gain's value (Gr) is to be passed onto the Receiver Antenna as its Antenna Gain value and i want to then display this Receiver Antenna's Gain value (Gr) onto the Spectrum Analyzer in the Simulink, but i don't know how to do that.
I have created a Model, Named: Testing_Receiver_Antenna_Only_V2 and is attached.
so please provide me with some suggestion/feedbacks on how to display the variable Receiver Antenna's Gain value onto the Spectrum Analyzer in Matlab Simulink.
Thanks and regards
Kei Lam

Answers (1)

Bhanu Prakash
Bhanu Prakash on 26 Dec 2023
Hi Kei,
I understand that you want to display ‘Receiver Antenna’s Gain Value (Gr)’ onto the Spectrum Analyzer in Simulink.
The block ‘Receiver Antenna Gain’ sends data of ‘single’ datatype to the ‘Receiver Antenna’ block, which leads to a data-type mismatch error as the ‘Receiver Antenna’ block expects the datatype to be ‘double’.
You can change the output datatype of ‘Receiver Antenna Gain’ block by modifying its Block Parameters as shown below:
Assuming the gain value ‘Gr’ to be present in the base workspace, you can display it in Spectrum Analyzer by using the ‘Constant’ block in Simulink as shown below:
The resulting waveforms in the Spectrum Analyzer are as follows:
Hope this helps!

Categories

Find more on Antennas and Electromagnetic Propagation in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!