MCQs > IT & Programming > MATLAB > Which statement creates a logical array that is 1 if the element in passwords contains a digit and 0 if it does not? Passwords = {'abcd' '1234' 'qwerty' 'love1'};

MATLAB MCQs

Which statement creates a logical array that is 1 if the element in passwords contains a digit and 0 if it does not? Passwords = {'abcd' '1234' 'qwerty' 'love1'};

Answer

Correct Answer: Cellfun(@(x) ~isempty(regexp(x, '\d')), passwords)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

MATLAB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

MATLAB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it