• Remix
  • Share
  • New Entry

on 24 Oct 2024
  • 17
  • 84
  • 0
  • 0
  • 1720
Cite your audio source here (if applicable):
drawframe(1);
Write your drawframe function below
function drawframe(f)
nElements = 8;
elemSpacing = 0.05;
elemPositions = 0.5*linspace(-1,1,nElements)*(nElements-1)*elemSpacing;
plotFactor = 5;
w = ones(nElements,1);
c = 3e8;
freq = 1.0e9;
rangeNotional = 5;
lambda = 3e8/freq;
nCycles = round(rangeNotional/lambda);
range = nCycles*lambda;
bw = 1000e6;
allFreq = freq + linspace(-bw/2,bw/2,nElements);
allLambda = 3e8./allFreq;
allPhase = 2*pi*allFreq.*(rangeNotional/3e8);
dt = 0.15/freq;
azSteer = 45; %deg
phaseDelay= (2*pi*elemSpacing / lambda)*sind(azSteer);
Df = 2*(elemSpacing*(nElements-1))^2 / lambda / 5;
xVec = linspace(-plotFactor*Df/2,plotFactor*Df/2,401);
yVec = linspace(-plotFactor*Df/2,plotFactor*Df/2,401);
[X, Y] = meshgrid(xVec,yVec);
elemDist = zeros([size(X), nElements]);
for ii = 1:nElements
elemDist(:,:,ii) = sqrt((X-elemPositions(ii)).^2 + Y.^2);
end
time = 0;
phaseDelayVec = phaseDelay*(0:nElements - 1) - allPhase;
phaseDelayVec(2:2:end) = phaseDelayVec(1:2:end-1);
phaseDelayMatrix = zeros(size(elemDist));
ampWeightMatrix = zeros(size(elemDist));
cosB = zeros(size(elemDist));
sinB = zeros(size(elemDist));
for ii = 1:nElements
phaseDelayMatrix(:,:,ii) = phaseDelayVec(ii);
ampWeightMatrix(:,:,ii) = w(ii);
cosB(:,:,ii) = cos(2*pi*elemDist(:,:,ii)/allLambda(ii) + phaseDelayMatrix(:,:,ii)) .* ampWeightMatrix(:,:,ii);
sinB(:,:,ii) = sin(2*pi*elemDist(:,:,ii)/allLambda(ii) + phaseDelayMatrix(:,:,ii)) .* ampWeightMatrix(:,:,ii);
end
dtFactor = sin(2*pi*(0:95)/96);
timeVector = cumsum(dt*dtFactor);
localPhase = permute(repmat(2*pi*timeVector(f)*allFreq',[1, size(X)]),[3 2 1]);
waveMag = sin(localPhase).*cosB - cos(localPhase).*sinB;
waveMagTotal = sum(waveMag,3);
clf
imagesc(xVec,yVec,abs(waveMagTotal));
axis equal square
set(gca,'YDir','normal')
xlim([-plotFactor*Df/2,plotFactor*Df/2])
ylim([-plotFactor*Df/2,plotFactor*Df/2])
axis off
colormap hot
end
Movie
Audio

This submission does not have audio.

Remix Tree