Strings‎ > ‎

Add prefix



Add prefix to numerical data


% generate 5 sample-IDs
% add prefix "Sample" to a sequence of 1...5 identifiers
% adding leading zeros keep (always 3 digits "001"):  '%.3d'

sprintf('Sample%.3d\n',1:5)
 Sample001
 Sample002
 Sample003
 Sample004
 Sample005