www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CallWhosWithinANestedOrAnonymousFunctionExample.m

    %% Call |whos| Within a Nested or Anonymous Function
% Create a function that contains a nested function and call |whos| within
% the nested function.

%% 
% Create a file |whos_demo.m|, that contains these statements.
%
% <include>whos_demo.m</include>
%

%%
% Run |whos_demo|. MATLAB(R) displays the variables of the nested 
% |get_date| function, and all functions that contain it, 
% grouped by function workspace.
% This grouping applies whether you call |whos| from your function code 
% or from the MATLAB(R) debugger.
whos_demo

%%
% When called within an anonymous function, variables in the anonymous
% function display in a seperate group, titled with the function signature.