x=[1 1; 1 -1; -1 -1; -1 1]'; X=-2:0.01:2; Y=X; N=length(X); [X,Y]=meshgrid(X,Y); Z1=0;Z2=0;Z3=0;Z4=0; for i=1:N for j=1:N Z1(i,j)=norm([X(i,j);Y(i,j)]-x(:,1))^2; Z2(i,j)=norm([X(i,j);Y(i,j)]-x(:,2))^2; Z3(i,j)=norm([X(i,j);Y(i,j)]-x(:,3))^2; Z4(i,j)=…