MATLAB: Another quick question about string read gesNum = 6; I want to get modelsq_6 other than modelsq_gesNum by using : sprintf('%s_%s', 'modelsq', 'gesNum'); I know this is wrong way, so how should I do? Best Answer EDIT sprintf('%s_%d', 'modelsq', gesNum); Related SolutionsMATLAB: Quick question about string read load(a1); MATLAB: How to concatenate 2 cell arrays containing strings vertcat( x{:} ) Related QuestionError using fprintf Unable to convert ‘sym’ value to ‘double’.How to solve the error Not enough input argumentsHow to make a file name with combination of two stringsSymbolic variables product does not produce symbolic result (Symbolic for loop)Number of leading zeroes as a variableHow to print result in MATLAB
Best Answer