Finding a sting - function strfind, MATLAB in Engineering

Finding a sting - function strfind:

The function strfind does necessarily similar thing, except that the order of the arguments does make dissimilarity. The common form is strfind(string, substring); it finds all the occurrences of the substring within the string, and it returns the subscripts.

>> strfind('abcdeabcde','e')

ans =

5  10

 

For both the strfind and findstr, if there are no occurrences, then the empty vector is returned.

>> strfind('abcdeabcde','ef')

ans =

[]

 

 

Posted Date: 10/20/2012 5:29:37 AM | Location : United States







Related Discussions:- Finding a sting - function strfind, Assignment Help, Ask Question on Finding a sting - function strfind, Get Answer, Expert's Help, Finding a sting - function strfind Discussions

Write discussion on Finding a sting - function strfind
Your posts are moderated
Related Questions
Use of built-in colormaps: MATLAB has built-in colormaps, it is also possible to generate others by using combinations of any colors. For illustration, the following generates

Print from the structure: To print from the structure, a disp function will show either the whole structure or a field. >> disp(package) item_no: 123 cost: 19.99

Vectors of Structures: In numerous applications, involving database applications, information generally would be stored in the vector of structures, instead of in individual s

Use of While loop: Here is an illustration of calling the function, passing 5000 for the value of the input argument high. >> factgthigh(5000) ans = 5040 The itera

Example of Exponential function modular program: In order to view the distinction in the approximate value for e as n increases, the user kept choosing Limit & entering larger

Structures: The Structures are data structures which group together values which are logically related in what are known as the fields of structure. The benefit of structures

Related Structure Functions: There are many functions which can be used with structures in a MATLAB. The function isstruct will return 1 for logical true when the variable arg

Use of Nested if-else statements: By using the nested if-else to select from among the three possibilities, not all the conditions should be tested. In this situation, if x is

Expanding a function: The expand function will multiply out terms, and factor will do the opposite: >> expand((x+2)*(x-1)) ans = x^2 x-2 >> factor(ans)

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca