In example 3(b) string 1 is ‘add’ and the second input is a multi-dimensional matrix of strings. Strcmp function will compare the first string with all elements of the second array individually And it will produce the result in the form of vector only. String 2 is ‘add’, ‘sub’, ‘div’ and ‘mul’. And the second string is an array or vector of strings. In example 3(a), there are two strings, the first string is one dimensional with data ‘add’, only one element is present in it. String 5 is ‘comp string’, in this string letters are the same as well as case is the same but the arrangement of letters is different so it will give again false results. strcmp is case sensitive function so it will consider both the strings are different though the strings are same. then string 4 is ‘STRING COMP’, this string is the same as string 1but all the letters are upper case. string 3 is ‘stringcomp’, in this string letters are the same but there is no space between two words that is why when we compare string 1 and string 3 it will give false results. String 1 is ‘ string comp ’ and string two is exactly the same as string 1 so the result will be 1 that is true. In this example, we assigned five different strings. the first string is ‘hi’ and the second string is ‘bye’. Therefore output will be 1 in example 1(a). Let us consider two strings with variable string 1 and string 2.string 1 is ‘hi’ and string 2 is also ‘hi’ so that we will get the true result after applying function strcmp. The true results indicate both the strings are exact matches and the false result indicates both the strings are not the same that is different. if the output is ‘0’ that means false result and if the output is ‘1’ that means true result. As we know ’strcmp’ command gives result in form of ‘1’ and ‘0’. To use command or function strcmp and strcmpi we need at least two inputs in the form of string for comparison purposes.
COMO USAR MATLAB 2012 HOW TO
Strcmpi (name of first string, name of second string) How to Use Strcmp in Matlab?
Strcmp (name of first string, name of second string) Hadoop, Data Science, Statistics & others