28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

.<br />

.<br />

fx = feval(funfcn,x,varargin{:});<br />

In the next example, @deblank returns a function handle to variable fhandle.<br />

Examining the handle using functions(fhandle) reveals that it is bound to<br />

two M-files that implement the deblank function. The default, strfun\<br />

deblank.m, handles most argument types. However, the function is overloaded<br />

by a second M-file (in the @cell subdirectory) to handle cell array arguments<br />

as well.<br />

fhandle = @deblank;<br />

ff = functions(fhandle);<br />

ff.default<br />

ans =<br />

matlabroot\toolbox\matlab\strfun\deblank.m<br />

ff.methods<br />

ans =<br />

cell: 'matlabroot\toolbox\matlab\strfun\@cell\deblank.m'<br />

When the function handle is evaluated on a cell array, feval determines from<br />

the argument type that the appropriate function to dispatch to is the one that<br />

resides in strfun\@cell.<br />

feval(fhandle, {'string ','with ','blanks '})<br />

ans =<br />

'string' 'with' 'blanks'<br />

See Also assignin, function_handle, functions, builtin, eval, evalin<br />

feval<br />

2-747

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!