# Documentation of pncont_old

Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)

## Function Synopsis

`pncont(xa, ya, x, clev, lab);`

## Help text

```     pncont(xa, ya, x, clev, lab);

This function will plot positive contours of x in solid
lines, and negative contours of x in dashed lines.

pncont(x) pncont's the matrix 'x'.
pncont(xa, ya, x) uses xa and ya as the x and y axes resp.
pncont(xa, ya, x, clev) uses levels outlined in 'clev', or if
clev is an integer, uses clev levels.
pncont(xa, ya, x, clev, lab) lab = 0 => don't label contours (default)
lab = 1 => label contours

```

## Listing of function pncont_old

```function pncont(xa, ya, x, clev, lab);

if nargin < 5; lab = 0; end;
if nargin < 4; clev = 10; end;
if nargin == 1;
x = xa;
[m, n] = size(x);
xa = 1:n;
ya = 1:m;
end;

[m,n] = size(x);

for i = 1:m;
for j = 1:n;
if x(i,j) <= 0;
xp(i,j) = 0;
xn(i,j) = x(i,j);
else;
xp(i,j) = x(i,j);
xn(i,j) = 0;
end;
end;
end;

[a, b] = contour(xa, ya, xp, clev(find(clev)), '-');
if lab; clabel(a, b); end;
hold on
[c, d] = contour(xa, ya, xn, clev(find(clev)), '--');
if lab; clabel(c, d); end;
[e, f] = contour(xa, ya, x, [0 0], '-.');
if lab; clabel(e, f); end;
hold off
grid on;```