CS 1371 Lecture Notes - Lecture 3: Cash Register, Camel Case, Decimal Mark
Document Summary
Take a semi-encrypted string and complete the encryption by replacing underscores ("_") with the provided numbers of the vector. Prior to slicing the numbers into the string, add 3 to each element in the vector, and cast them into string numbers. Though you may be given non-single digit numbers, all numbers must be single digits by the time they are sliced into the string. To accomplish this, set all elements greater than or equal to 10 in the modified vector to zero. The number of underscores in the sentence will be the same as the length of the vector of numbers. If you decide to use num2str() for this problem (which is highly recommended) you need to delete the spaces that are leftover (e. g. , num2str([1 2]) --> "1 2" w/ spaces between the 1 and 2). Test case: str1 = "for my records, my s_ud_n_ _d # is 902_5_9_9.