Planning a 5G Fixed Wireless Access Link over Terrain - Not run

1 view (last 30 days)
I am running the original code of the MATLAB website
And in the next part I get an error message:
% Design reflector-backed crossed dipole antenna
txElement = reflectorCrossedDipoleElement(fq); % this is not run
% Define array size
ntxrow = 8;
ntxcol = 12;
% Define element spacing
lambda = physconst("lightspeed")/fq;
drow = lambda/2;
dcol = lambda/2;
% Create 8-by-12 antenna array
tx.Antenna = phased.URA("Size",[ntxrow ntxcol], ...
"Element",txElement, ...
"ElementSpacing",[drow dcol]);
% Plot pattern on the map
Undefined function 'reflectorDipoleElement' for input
arguments of type 'double'.
Error in pop3 (line 60)
rxElement = reflectorDipoleElement(fq);
Am I missing TOOLBOX or why doesn't it work?

Answers (1)

Abderrahim. B
Abderrahim. B on 12 Aug 2022
Edited: Abderrahim. B on 12 Aug 2022
reflectorDipoleElement is a function in your live script. Scroll down to the bottom of the script and see if it is there, maybe it has a different name!
I have run the same example, and it worked for me. I am using MATLAB 2022A, latest update.
Some tips to fix the error:
  • Check fq data type
  • Do some debugging
  • Check if you have antenna toolbox, and all the other required products
Hope this helps




Community Treasure Hunt

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

Start Hunting!