Skip to content

contourc

plot · scripts/plot/draw/contourc.m

: c = contourc (z)
: c = contourc (z, n)
: c = contourc (z, v)
: c = contourc (x, y, z)
: c = contourc (x, y, z, n)
: c = contourc (x, y, z, v)
: [c, lev] = contourc (…)

Compute contour lines of the matrix z without drawing them.

Without n or v about ten levels at round values are chosen. A scalar n asks for that many levels inside the data range, a vector v lists the levels explicitly (use [v v] for a single level).

The result c has two rows. Each contour line contributes a header column [level; count] followed by count columns of vertices [x; y]. Lines are ordered by ascending level. If no contour exists the result is zeros (2, 0). The optional second output lists the levels that were used.