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

    %% Check Existence of Workspace Variable
%%
% Create a variable named |testresults|, and then confirm
% its existence in the workspace.
testresults = magic(5);
exist testresults
%%
% A variable named |testresults| exists in the workspace.