Hello Markus,
Below is the output of your script from matlab2017b and one attachment of figure.
>> close all
>>hf = figure;
>> peaks();
z = 3*(1-x).^2.*exp(-(x.^2) - (y+1).^2) ...
- 10*(x/5 - x.^3 - y.^5).*exp(-x.^2-y.^2) ...
- 1/3*exp(-(x+1).^2 - y.^2)
>> p=camup();
>> fprintf ('%.17f\n', p);
0.00000000000000000
0.00000000000000000
1.00000000000000000
>> camroll (30);
>> p = camup ();
>> fprintf ('%.17f\n', p);
0.33969638129660373
0.02014238382998192
0.94031944194919104
>> camroll (-30);
>> p = camup ();
>> fprintf ('%.17f\n', p);
0.14033891839365262
0.18289323924769943
0.97306477226420207