Create a function called, fnUserBinaryInputX where X is your last name. This function will ask the user to enter a string. Based on the user entered string, the function will return "false" or "true" (false and true are Matlab built-in keywords).
- The function fnUserBinaryInputX has 2 input arguments, each is a string. The first string is the "prompt" string displayed to the user when asked to enter a string. The second argument to the function is the string to compare the user entered string to.
- The value returned by the function fnUserBinaryInputX is the value returned by the non-case sensitive comparison (strcmpi) of the user input with the 2nd input argument string. The function is actually very trivial - four lines: a function definition, an input, a comparison, and an end statement. You will see later why we made this function.
- For the two string inputs of the function, the names will start with the letters "ans" followed by a description of the string beginning with a capital letter (eg ansString). "a" stands for argument, "n" stands for "native", and "s" stands for string.