/usr/share/freemat/toolbox/graph/zplane.m is in freemat-data 4.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | % ZPLANE ZPLANE Zero-pole plot
%
% Usage
%
% This function makes a zero-pole plot of a discrete-time
% system defined by its zeros and poles. The various syntaxes
% are
%
% zplane(z,p)
%
% where z and p are the zeros and the poles of the system
% stored as column vectors, or
%
% zplane(b,a)
%
% where a and b are the polynomial coefficients of the
% numerator and denominator stored as line vectors (roots is
% used to find the zeros and poles). The symbol 'o' represents
% a zero and the symbol 'x' represents a pole. The plot includes
% the unit circle for reference.
% Contributed by Paulo Xavier Candeias under GPL
function zplane(zer,pol)
figure;
axis equal;
axis square;
grid('on')
title('Pole/Zero Plot');
xlabel('Real Part');
ylabel('Imaginary Part');
hold('on');
[lz,cz] = size(zer);
[lp,cp] = size(pol);
if (cz == 1) & (cp == 1)
% do nothing
elseif (lz == 1) & (lp == 1)
zer = roots(zer);
pol = roots(pol);
else
error('wrong use (see help zplane)')
end
plot(real(zer),imag(zer),'bo');
plot(real(pol),imag(pol),'bx');
plot(exp(2i*pi*(0:0.01:1)),'b:');
|