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

    %% Determine Variable Name Validity
% Show that input that starts with a number is not a valid variable name.
s = '8th_column';
isvarname(s)
%%
% Change the input to a valid variable name.
s = 'column_8';
isvarname(s)
%%
% Use the command form to determine if the input is a valid variable name.
isvarname column_8