Code covered by the BSD License
by David Silver
04 Jul 2011
FCN2MAT Convert user-defined single-valued function to matrix
| Watch this File
Convert user-defined single-valued function to matrix.
FCN2MAT is used to 'draw' the graph of a single-valued function on a matrix.
You can 'plot' a function f(x) on a matrix.
The image above is the output of the following:
[ grph,approx ] = fcn2mat('sin(x)*cos(2*x)',-6,6,0.03,3,0.03,-2,2); imshow(approx)
Contact us