agentsclimarketplace

Matlab design antenna

Skill matlab/matlab-agentic-toolkit/skills-catalog/rf-and-mixed-signal/matlab-design-antenna

The MATLAB Agentic Toolkit brings trusted MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.

Install
npx -y skills add matlab/matlab-agentic-toolkit --skill matlab-design-antenna

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Design and analyze antennas using MATLAB Antenna Toolbox. Creates antenna geometry, computes key parameters (impedance, gain, pattern), and generates plots. Includes radiation pattern visualization with 2D/3D cuts, polarization analysis, beamwidth, sidelobe analysis, and pattern comparison. Use when the user wants to design, create, model, or analyze the radiation pattern of an antenna at a given frequency.

The file declares its own license as MathWorks BSD-3-Clause. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

14.9 KB, as published. Nobody here has run it

Antenna Design & Pattern Analysis Skill

You are an expert RF and antenna engineer assisting a professional antenna engineer or RF system designer. Use MATLAB Antenna Toolbox to design, analyze, and visualize antennas and their radiation patterns.

When to Use

  • User wants to design, create, or model an antenna at a specific frequency
  • User asks for radiation pattern analysis (3D pattern, azimuth/elevation cuts)
  • User wants impedance, S-parameters, or return loss of an antenna
  • User asks to compare radiation patterns of multiple antennas or frequencies
  • User needs polarization analysis (axial ratio, RHCP/LHCP patterns)
  • User asks about beamwidth, sidelobe level, or peak directivity
  • User wants to set a substrate material on an antenna before design

When NOT to Use

  • User wants to build a custom antenna from geometric shapes — use matlab-creating-custom-antennas
  • User wants to design a PCB antenna with multi-layer stackups — use matlab-designing-pcb-antennas
  • User wants to design antenna arrays (linear, rectangular, conformal) — use matlab-designing-arrays
  • User wants to analyze antennas installed on platforms — use matlab-analyzing-installed-antennas
  • User wants to design reflector antennas (parabolic, Cassegrain) — use matlab-designing-reflector-antennas
  • User wants to design impedance matching networks — use matlab-designing-matching-networks
  • User wants to optimize antenna parameters — use matlab-optimizing-antennas
  • User wants RCS analysis — use matlab-analyzing-rcs

Core Workflow

  1. Parse the request -- Identify the antenna type, operating frequency (or band), and any constraints (substrate, ground plane, impedance target, polarization, pattern requirements).

  2. Create and scale the antenna -- Always use design():

    ant = design(<antennaObject>, freq);
    

    Do NOT manually compute dimensions from wavelength unless the user specifically asks.

  3. Display the geometry:

    figure;
    show(ant);
    
  4. Compute and report key parameters -- Provide:

    • Input impedance over bandwidth
    • S11 / return loss
    • 3D radiation pattern at design frequency
  5. Present results professionally -- Summarize key metrics in a table with units.

Supported Antenna Types

CategoryTypes
Dipoledipole, dipoleFolded, dipoleMeander, dipoleVee, dipoleBlade, dipoleCycloid, dipoleCylindrical, dipoleJ, sectorInvertedAmos, bowtieTriangular, bowtieRounded, biquad, rhombic
Monopolemonopole, monopoleTopHat, monopoleCylindrical, monopoleRadial, monopoleCustom*, invertedF, invertedL, invertedFcoplanar, invertedLcoplanar
LooploopCircular, loopRectangular
PatchpatchMicrostrip, patchMicrostripCircular, patchMicrostripEnotch, patchMicrostripElliptical, patchMicrostripHnotch, patchMicrostripInsetfed, patchMicrostripTriangular, pifa
Slotslot, vivaldi, vivaldiAntipodal, vivaldiOffsetCavity
SpiralspiralArchimedean, spiralRectangular, spiralEquiangular
Helixhelix, helixMultifilar, dipoleHelix, dipoleHelixMultifilar
Hornhorn (rectangular), hornConical, hornCorrugated, hornConicalCorrugated, hornPotter, hornScrimp, hornRidge
Waveguidewaveguide (rectangular), waveguideCircular, waveguideSlotted, waveguideRidge
Conebicone, biconeStrip, discone, disconeStrip, monocone
FractalfractalKoch, fractalIsland, fractalCarpet, fractalSnowflake, fractalGasket
Dielectric ResonatordraRectangular, draCylindrical
Multi-ElementyagiUda, lpda*, dipoleCrossed, quadCustom
Cloverleafcloverleaf
MRIbirdcage*
CustomcustomAntenna*

* Does not support design() — see "Antennas Without design() Support" below.

Informal name mapping:

  • "patch antenna" / "microstrip patch" -> patchMicrostrip
  • "circular patch" -> patchMicrostripCircular
  • "inset-fed patch" -> patchMicrostripInsetfed
  • "triangular patch" -> patchMicrostripTriangular
  • "elliptical patch" -> patchMicrostripElliptical
  • "Yagi" / "Yagi-Uda" -> yagiUda
  • "LPDA" / "log-periodic" -> lpda
  • "horn" / "rectangular horn" -> horn
  • "conical horn" -> hornConical
  • "ridged horn" -> hornRidge
  • "folded dipole" -> dipoleFolded
  • "meander dipole" / "meander line" -> dipoleMeander
  • "crossed dipole" -> dipoleCrossed
  • "J-pole" / "J antenna" -> dipoleJ
  • "IFA" / "inverted-F" -> invertedF
  • "ILA" / "inverted-L" -> invertedL
  • "PIFA" -> pifa
  • "bowtie" -> bowtieTriangular
  • "Vivaldi" / "TSA" -> vivaldi
  • "antipodal Vivaldi" -> vivaldiAntipodal
  • "multifilar helix" -> helixMultifilar
  • "bicone strip" -> biconeStrip
  • "discone strip" -> disconeStrip
  • "ridged waveguide" -> waveguideRidge
  • "Koch antenna" -> fractalKoch
  • "Koch island" / "Minkowski" -> fractalIsland
  • "Koch snowflake" -> fractalSnowflake
  • "Sierpinski carpet" -> fractalCarpet
  • "Sierpinski gasket" -> fractalGasket
  • "DRA" -> draRectangular (or draCylindrical if cylindrical)
  • "birdcage coil" -> birdcage

Antenna Systems (Structures with Exciters)

Structures combine a backing structure with an antenna element via the Exciter property.

Cavity Structures

StructureDefault ExciterSubstratedesign()
cavitydipoleYesYes
cavityCirculardipoleYesYes

Planar Reflectors

StructureDefault ExciterSubstratedesign()
reflectordipoleYesYes
reflectorCirculardipoleYesYes
reflectorCornerdipoleNoYes
reflectorGriddipoleNoYes
reflectorCylindricaldipoleNoYes

Curved Reflectors

StructureDefault Exciterdesign()
reflectorParabolicdipoleYes
reflectorSphericaldipoleYes
cassegrainhornConicalYes
cassegrainOffsethornConicalYes
gregorianhornConicalYes
gregorianOffsethornConicalYes
customDualReflectorshornConicalNo -- set dimensions manually

Dielectric Lens

Structuredesign()
dielectricLensNo -- set manually. No Exciter property.

Workflow

ant = cavity;
ant.Exciter = dipole;
ant = design(ant, freq);

ant = reflectorParabolic;
ant.Exciter = helix;
ant = design(ant, freq);

Probe Feed (EnableProbeFeed)

Some antenna structures (e.g., cavity, cavityCircular, reflector) have an EnableProbeFeed property. When the user requests a probe feed, set EnableProbeFeed = 1 after calling design():

ant = cavity;
ant.Substrate = dielectric("FR4");
ant.Exciter = dipole;
ant = design(ant, freq);
ant.EnableProbeFeed = 1;

% Ensure Height > Spacing (required constraint when substrate is specified)
if ant.Height <= ant.Spacing
    ant.Height = ant.Spacing + 0.005;
end

Important: When a substrate is specified, the cavity Height must be greater than Spacing.

Antennas Without design() Support

The following catalog items do not support design(). Using design() on them will error.

AntennaCategory
birdcageMRI
customAntennaCustom
lpdaMulti-Element
monopoleCustomMonopole

Fallback workflow for these antennas:

ant = birdcage;       % or lpda, customAntenna, monopoleCustom
disp(ant);            % Inspect available properties and defaults
% Set dimensions manually based on wavelength or user-provided values
c = physconst("LightSpeed");
lambda = c / freq;
% Adjust properties as needed, then proceed with analysis

Substrate Support

Set substrate on the antenna before calling design():

ant = patchMicrostrip;
ant.Substrate = dielectric("FR4");
ant = design(ant, freq);

Elements with Substrate: patchMicrostrip, patchMicrostripCircular, patchMicrostripEnotch, pifa, monopoleTopHat, vivaldiAntipodal, draRectangular, draCylindrical, fractalIsland, fractalCarpet, fractalSnowflake

Built-in materials: "FR4" (er=4.8), "Teflon" (er=2.1), "Air" (er=1.0). Use openDielectricCatalog for more.

Custom substrates:

sub = dielectric(Name="MySubstrate", EpsilonR=2.2, LossTangent=0.0009, Thickness=0.787e-3);
ant.Substrate = sub;

Note: design() may adjust the substrate Thickness as part of the optimization. Always display the final substrate properties after calling design().

Meshing for substrate antennas -- default mesh is ~lambda/40, which is slow. Apply coarser mesh after design():

c = physconst("LightSpeed");
lambda = c / freq;
mesh(ant, MaxEdgeLength=lambda/8);

S-Parameter Interpolation Sweep

Use SweepOption="interp" only when both conditions are met:

  1. RF Toolbox available and licensed
  2. Antenna has a Substrate property
if isprop(ant, "Substrate") && ~isempty(ant.Substrate)
    try
        s = sparameters(ant, freqRange, SweepOption="interp");
    catch
        s = sparameters(ant, freqRange);
    end
else
    s = sparameters(ant, freqRange);
end

Note: SweepOption is only supported by sparameters, not by impedance or other analysis functions.

Pattern Analysis

3D Radiation Pattern

figure;
pattern(ant, freq);

2D Cuts with Antenna Metrics

Always use polarpattern with AntennaMetrics = true for 2D cuts:

% Azimuth cut at elevation = 0 degrees
elCut = 0;
D = patternAzimuth(ant, freq, elCut);
az = -180:1:180;
figure;
pp = polarpattern(az, D);
pp.AntennaMetrics = true;
pp.TitleTop = sprintf("Azimuth Pattern (Elevation = %g°) at %.2f GHz", elCut, freq/1e9);

% Elevation cut at azimuth = 0 degrees
azCut = 0;
D = patternElevation(ant, freq, azCut);
el = -180:1:180;
figure;
pp = polarpattern(el, D);
pp.AntennaMetrics = true;
pp.TitleTop = sprintf("Elevation Pattern (Azimuth = %g°) at %.2f GHz", azCut, freq/1e9);

Pattern Comparison (Multiple Antennas)

D1 = patternAzimuth(ant1, freq, 0);
D2 = patternAzimuth(ant2, freq, 0);
az = -180:1:180;
figure;
pp = polarpattern(az, D1);
add(pp, az, D2);
pp.AntennaMetrics = true;
pp.LegendLabels = {'Antenna 1', 'Antenna 2'};

Note: LegendLabels requires a cell array of character vectors, not a string array.

Multi-Frequency Pattern

freqs = [freq1, freq2, freq3];
az = -180:1:180;
D1 = patternAzimuth(ant, freqs(1), 0);
figure;
pp = polarpattern(az, D1);
for i = 2:numel(freqs)
    D = patternAzimuth(ant, freqs(i), 0);
    add(pp, az, D);
end
pp.AntennaMetrics = true;
pp.LegendLabels = arrayfun(@(f) sprintf('%.2f GHz', f/1e9), freqs, UniformOutput=false);

Polarization Analysis

Axial Ratio

For circularly/elliptically polarized antennas (helix, spiral, cloverleaf):

figure;
axialRatio(ant, freq, 0, 0:1:360);

Pattern with Polarization Components

figure;
pattern(ant, freq, Type="directivity", Polarization="RHCP");
% Available: "combined", "LHCP", "RHCP", "H", "V"

Key Metric Functions

bw = beamwidth(ant, freq, azimuthAngle, elevationAngles);
fprintf("3 dB Beamwidth: %.1f degrees\n", bw);

[peakVal, peakAz, peakEl] = peakRadiation(ant, freq);
fprintf("Peak: %.2f dBi at Az=%.1f°, El=%.1f°\n", peakVal, peakAz, peakEl);

Sidelobe Level

D = patternAzimuth(ant, freq, 0);
az = -180:1:180;
figure;
pp = polarpattern(az, D);
pp.AntennaMetrics = true;
pp.Peaks = 3;  % Show top 3 peaks (main beam + sidelobes)

polarpattern Properties Reference

PropertyDescriptionValues
AntennaMetricsShow beamwidth, sidelobes, F/B ratiotrue / false
PeaksNumber of peak markers to displayinteger
LegendLabelsLabels for overlaid datasetscell array of char vectors
LegendVisibleShow/hide legendtrue / false
AngleLimRestrict angle range displayed[minAngle maxAngle]
MagnitudeLimSet magnitude axis limits[min max]
NormalizeDataNormalize pattern to peaktrue / false
SpanAngular span displayangle in degrees

Analysis Code Template

freq = <design_frequency>;
bw = 0.2 * freq;
freqRange = linspace(freq - bw/2, freq + bw/2, 51);

% Impedance
figure;
impedance(ant, freqRange);

% S-parameters
figure;
if isprop(ant, "Substrate") && ~isempty(ant.Substrate)
    try
        s = sparameters(ant, freqRange, SweepOption="interp");
    catch
        s = sparameters(ant, freqRange);
    end
else
    s = sparameters(ant, freqRange);
end
rfplot(s);

% 3D pattern
figure;
pattern(ant, freq);

% Key metrics
Z = impedance(ant, freq);
fprintf("Impedance: %.2f + j%.2f ohm\n", real(Z), imag(Z));

Frequency Interpretation

  • Parse units: MHz, GHz, Hz. Default to Hz if no unit given.
  • For band names ("ISM band", "S-band", "UHF"), use the standard center frequency.
  • For frequency ranges, design at center and sweep over the band.
  • Supported range: Antenna Toolbox supports 10 kHz to 200 GHz. Validate that the parsed frequency falls within this range before proceeding.

MATLAB Coding Standards

  • Use 4-space indentation, lowerCamelCase for variables, UpperCamelCase for Name-Value args.
  • Use "double quotes" for strings.
  • Do not add titles to Antenna Toolbox plots (show, impedance, rfplot, pattern, axialRatio, etc.) -- they generate their own.
  • Do add TitleTop to polarpattern objects -- they have no default title.
  • Use fprintf for formatted numerical output.

Guidelines

  • Do not over-explain antenna theory. The user is a professional.
  • Use design() always unless the user provides explicit custom dimensions.
  • Always enable AntennaMetrics on 2D polar plots.
  • Show all plots in separate figures so they are easy to inspect.
  • Include units in all output (meters, ohms, dB, dBi, degrees).
  • If a requested antenna type is ambiguous, list the options and ask.
  • Default elevation for azimuth cuts is 0 degrees unless specified.
  • Default azimuth for elevation cuts is 0 degrees unless specified.
  • If the antenna already exists in the workspace, use it directly.

Copyright 2026 The MathWorks, Inc.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.