1
function fcontour2d(xr,yr,f,nz,style,strf,leg,rect,nax,void)
2
// deff('[z]=surf(x,y)','z=x**2+y**2');
3
// fcontour(surf,-1:0.1:1,-1:0.1:1,10);
9
s_mat=['deff(''[z]=surf(x,y)'',''z=x**3+y'');';
10
'fcontour2d(-1:0.1:1,-1:0.1:1,surf,10,style=1:10,rect=[-1,-1,1,1]*1.5,strf='"011"');'];
11
write(%io(2),s_mat);execstr(s_mat);
15
error(' I need at least 3 arguments or zero to have a demo');
19
if exists('nz','local')==0 then nz=10,rhs=rhs+1,end
20
if exists('style','local')==1 then opts=[opts,'style=style'],end
21
if exists('strf','local')==1 then opts=[opts,'strf=strf'],end
22
if exists('leg','local')==1 then opts=[opts,'leg=leg'],end
23
if exists('rect','local')==1 then opts=[opts,'rect=rect'],end
24
if exists('nax','local')==1 then opts=[opts,'nax=nax'],end
25
if exists('frameflag','local')==1 then opts=[opts,'frameflag=frameflag'],end
26
if exists('axesflag','local')==1 then opts=[opts,'axesflag=axesflag'],end
28
if size(opts,2)<rhs-4 then error('invalid named arguments'),end
30
if type(f)==11 then comp(f),end;
31
execstr('contour2d(xr,yr,feval(xr,yr,f),nz,'+strcat(opts,',')+')')