Name

assert_plotcond — Plots the condition number of a function.

Calling Sequence

   h = assert_plotcond ( funname )
   
   

Parameters

funname :

a 1-by-1, matrix of strings, the function name

h :

the graphics handle

Description

Plots the condition number of the function with the function itself. Automatically switches to log-scale for f and its condition, if possible and if necessary. Move the y-label to the left if x data contains mixed signs.

Examples

// The values of atan and its condition are regular:
// use a regular scale.
assert_plotcond ( "atan" , linspace(-1,1,1000) );

// The condition values of acos are positive and of very different magnitudes :
// automatically switches to log scale.
assert_plotcond ( "acos" , linspace(-1,1,1000) );
assert_plotcond ( "sin" , linspace(-4,4,1000) );

// The exp values are positive and of very different magnitudes :
// automatically switches to log scale.
assert_plotcond ( "exp" , linspace(-7e2,7.e2,1000) );

// The values of the condition number are very close to zero,
// but we keep the regular scale, as low condition numbers
// are of no interest for us.
assert_plotcond ( "erf" , linspace(-6,6,1000) );

   

Authors

Michael Baudin, DIGITEO, 2010