RE:
I am hoping to do something similar to what I did for the function that ensures a capital letter is present in the string. It will look better when written out similarly, in my opinion. Here is what I did for that function:
function [CAPS_check]=CAPS_check(password)
%CAPS_check ensures there is at least one capital letter in the password
%all(lower(password)==password) equal to one, then function has at least one CAP
CAPS_check=all(lower(password)==password);
end