time | Calls | line |
---|
< 0.001 | 1 | 43 | function obj = onCleanup(functionHandle)
|
| | 44 | % onCleanup - Create an ONCLEANUP object
|
| | 45 | % C = ONCLEANUP(FUNC) creates C, a ONCLEANUP object. There is no need to
|
| | 46 | % further interact with the variable, C. It will execute FUNC at the time
|
| | 47 | % it is cleared.
|
| | 48 | %
|
| | 49 | % See also: CLEAR, ONCLEANUP
|
| 1 | 50 | narginchk(1, 1);
|
< 0.001 | 1 | 51 | if ~isa(functionHandle, 'function_handle') || ~isscalar(functionHandle)
|
| | 52 | error(message('MATLAB:onCleanup:TaskMustBeFunctionHandle'));
|
| | 53 | end
|
< 0.001 | 1 | 54 | obj.task = functionHandle;
|
< 0.001 | 1 | 55 | end
|
Other subfunctions in this file are not included in this listing.