Compute isolines (countour lines) of the matrix z. Parameters x, y and vn are optional.
The return value lev is a vector of the contour levels. The return value c is a 2 by n matrix containing the contour lines in the following format
c = [lev1, x1, x2, ..., levn, x1, x2, ... len1, y1, y2, ..., lenn, y1, y2, ...]in which contour line n has a level (height) of levn and length of lenn.
If x and y are omitted they are taken as the row/column index of z. vn is either a scalar denoting the number of lines to compute or a vector containing the values of the lines. If only one value is wanted, set vn
= [val, val]
; If vn is omitted it defaults to 10.For example,
x = 0:2; y = x; z = x' * y; contourc (x, y, z, 2:3) 2.0000 2.0000 1.0000 3.0000 1.5000 2.0000 2.0000 1.0000 2.0000 2.0000 2.0000 1.5000See also: contour
The following code
x = 0:2; y = x; z = x' * y; contourc (x, y, z, 2:3)
gives an example of how 'contourc' is used.