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

5 views (last 30 days)
Hi
I am running the original code of the MATLAB website
https://ch.mathworks.com/help/antenna/ug/planning-a-5G-fixed-wireless-access-link-over-terrain.html
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
pattern(tx)
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?
TNX

Answers (1)

Issa
Issa on 12 Aug 2022
Edited: Issa on 12 Aug 2022
Hi!
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!
Edit:
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

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!