%% Calculate Current Distribution on Rat-Race Coupler
% Create a rat-race coupler with default properties.

coupler = couplerRatrace;

% Set the excitation voltage and the phase angle at the ports of the coupler.

v = voltagePort(4)
v.FeedVoltage = [1 0 1 0]
v.FeedPhase = [90 0 270 0]

% Calculate and plot the current on the coupler at 3 GHz.

figure
current(coupler,3e9,Excitation=v)

% Copyright 2020 The MathWorks, Inc.