Session 4 Bonus Problem

  1. Finish uptight password. Write a program that asks a user for a new password which must abide by the following rules:
    • Length must be at least 6 characters.
    • Must have at least one digit.
    • Must have at least one Upper case and one Lower case letter.
    • If user enters a valid password, say "Ok, password valid"
    • If user enters a password without a digit, say "you forgot to include at least one digit"
    • If passwords does not have at least one Upper and one Lower case letter, say "you forgot to include at least one upper case and one lower case letter"
    • Create a Table and write it to a file in memory with the following information:
      "AttemptNumber", "AttemptedPassword", and "ErrorCode"
  2. Using the excel file ExperimentalData.xlsx, read the data into a table in Matlab, compute the mean RT (for correct RTs only) for each subject. Create a new table where the first column is subject number and the second column is the average RT for that subject in the experiment and save this new table into a new file (summarytable.txt)
  3. Convert MessWord.m into a function, fscram, which scrambles the inside characters of a string, or if too small, returns it unscrambled. Convert encrypt.m into a function, fencry, which encrypts words.
  4. Write a function that reads in a file the user specifies which contains the password attempts, concatenates each table's row into a long string, and then either scrambles or encrypts that string (the user should choose which). It should return a table containing the scrambled or encrypted strings.