summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/plotdata/pgfplotscontourmatlabexample.m
blob: 44c28b43ad95b4a7ff74e5bea4b721ec67bd474a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
A=[         0         0         0         0;
    1.0000         0         0         0;
    2.0000         0         0         0;
    3.0000         0         0         0;
         0    1.0000         0         0;
    1.0000    1.0000    0.6000    0.6000;
    2.0000    1.0000    0.7000    0.7000;
    3.0000    1.0000    0.5000    0.5000;
         0    2.0000         0         0;
    1.0000    2.0000    0.7000    0.7000;
    2.0000    2.0000    0.8000    0.8000;
    3.0000    2.0000    0.5000    0.5000];
[x,y]=meshgrid(1:3,1:4);
x(:) = A(:,1);
y(:) = A(:,2);
z=x;
z(:) = A(:,3);

data = contour(x,y,z,3);
data=data';
save 'pgfplotscontourmatlabexample.dat' data -ASCII