myStrCmpI - The strings may not necessarily be the same...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 9/21/2009 5:38 PM % Function Name: myStrCmpI % Inputs: % 1. char array - string to be compared % 2. char array - string to be compared % Output: % 1. logical - true if the strings are the same ignoring case, false % otherwise % % Function Description: % This function takes in two strings and returns true if the strings are % the same except for case and false otherwise.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The strings may not % necessarily be the same length. You may not use the following % functions in your code: strcmpi, strcmp. % function check = myStrCmpI(c1, c2) if(length(c1) ~= length(c2)) check = false; else checks = ; for i = 1:length(c1) checks = [checks lower(c1(i))==lower(c2(i))]; end check = all(checks); end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online