I have to extract certain numbers from an input. I turned it into a string to use the extractAfter and extractBefore functions. This is what the code looks like:
inputID = input('Please input an ID:');
createDate = input('Please input the creation date in MMDDYYYY format:');
str1 = string(inputID)
str2 = extractAfter(str1,5)
str3 = extractBefore(str2,9)
While the extracting is working as it should, the string function turns my input into "1.08592017101e+18." When I extract the parts, it doesn't include the other numbers after the "e," which I need. Is there a way to make it into a string without it becoming "1.08592017101e+18" ?
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/377296-made-input-into-string-but-it-s-not-showing-all-the-numbers-i-need#comment_524957
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/377296-made-input-into-string-but-it-s-not-showing-all-the-numbers-i-need#comment_524957
Sign in to comment.