Navigation

Operators and Keywords

Function List:

C++ API

fplot.m File Reference


Functions

function fplot (fn, limits, n, linespec) if(nargin< 2||nargin > 4) print_usage()
endif if (nargin< 3) n=0.002
endif if (ischar(n)) have_linespec
endif if (strcmp(typeinfo(fn),"inline function")) fn
 elseif (isa(fn,"function_handle")) nam
 elseif (all(isalnum(fn))) nam
endif if (floor(n)!=n) tol
 while (n< 2.^20) y00
endif if (have_linespec) plot(x
else plot (x, y)
endif if (length(limits) > 2) axis(limits)
endif if (isvector(y)) legend(nam)
endfor legend (nams{:})
endif endfunction!demo !fplot ("cos",[0, 2 *pi])%!demo%!fplot("[cos(x)
endif endfunction!demo sin (x)]"

Variables

endif have_linespec = true
 linespec = n
 n = 0.002
 nam = formula (fn)
else fn = vectorize (inline (fn))
 x0 = linspace (limits(1), limits(2), 5)'
 y0 = feval (fn, x0)
 err0 = Inf
 x = linspace (limits(1), limits(2), n)'
 y = feval (fn, x)
 err = 0.5 * max (abs ((y00 - y) ./ (y00 + y))(:))
else for i

Function Documentation

endif endfunction !demo !fplot ( "cos"   ) 

elseif ( all(isalnum(fn))   ) 

elseif ( isa(fn,"function_handle")   ) 

function fplot ( fn  ,
limits  ,
,
linespec   
)

endif if ( isvector(y)   ) 

endif if ( length(limits)  ,
 
)

endif if ( have_linespec   ) 

endif if ( floor(n)!  = n  ) 

endif if ( strcmp(typeinfo(fn),"inline function")   ) 

endif if ( ischar(n)   ) 

endif if (  )  [pure virtual]

endfor legend (  ) 

else plot ( ,
 
)

endif endfunction !demo sin (  ) 

while (  ) 


Variable Documentation

err = 0.5 * max (abs ((y00 - y) ./ (y00 + y))(:))

err0 = Inf

else fn = vectorize (inline (fn))

else for i

Initial value:

 1:columns (y)
      nams{i} = sprintf ("%s(:,%i)", nam, i)

n = 0.002

nam = formula (fn)

endwhile else x = linspace (limits(1), limits(2), n)'

endif x0 = linspace (limits(1), limits(2), 5)'

endif y = feval (fn, x)

y0 = feval (fn, x0)