Code covered by the BSD License

# Web Server Demo

### Stefan Duprey (view profile)

How to deploy a MATLABĀ® made application on a web server

myplotcircles(x, optimValues, state, varargin)
```function stop = myplotcircles(x, optimValues, state, varargin)
% Plotting function for displaying the cell tower locations
stop = false;
if nargin > 3
R  = varargin{1};
xL = varargin{2};
xU = varargin{3};
yL = varargin{4};
yU = varargin{5};
else
% Get constants from the base workspace
R  = evalin('base', 'R');
xL = evalin('base', 'xL');
xU = evalin('base', 'xU');
yL = evalin('base', 'yL');
yU = evalin('base', 'yU');
end

pts = reshape(x,2,length(x)/2);
X = pts(1,:);
Y = pts(2,:);
N = length(R);

if isnumeric(optimValues)
iter = optimValues;
else
iter = optimValues.iteration;
end

switch state
case {'iter', ''}
t = 0:.1:2*pi+0.1;

cla;
for i = 1:N
fill(R(i)*cos(t) + X(i), R(i)*sin(t) + Y(i), [0.3 0.3 1]);
alpha(0.5);
%       plot(R(i)*cos(t) + X(i),R(i)*sin(t) + Y(i))
text(X(i),Y(i),num2str(i))
hold on
end

plot([xL;xU;xU;xL;xL],[yL;yL;yU;yU;yL],'r');
axis([xL-1, xU+1, yL-1, yU+1]);
axis square;

title(sprintf('Iteration: %d', iter));
pause(.1);
end
```