MATLAB: Can we use numbers in variable names genvarnamevalid symbolvariable name Hai, Can we use numbers in variable names, while programming in matlab. For example, tetai2, 3abc, etc… Looking for your reply. BSD Best Answer Yes, as long as it doesn't start with a number. See doc genvarname for more details.>> Var2=1;2Var=3;??? 2Var=3; |Error: Unexpected MATLAB expression. Related SolutionsMATLAB: Invalid expression error when i execute code You can't use numbers as a variable names. Valid variable and function names begin with an alphabetic character, and can contain letters, numbers, or underscores.You must write: function j3012 = RCPSP(var1,var2,var3) MATLAB: Using variable value to name a folder Name=4205;writetable(T,sprintf('%d.csv',Name)); Related QuestionHow to keep track of iterate numbers in variable namesUnstack warnings about variable namesConvert strings back to variable names
Best Answer