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
Illustration of Gauss elimination: For illustration, for a 2 × 2 system, an augmented matrix be: Then, the EROs is applied to obtain the augmented matrix into an upper

Gauss Elimination: The Gauss elimination technique consists of:    Generating the augmented matrix [A b]    Applying EROs to augmented matrix to obtain an upper trian

Variable Scope: The scope of any of variable is the workspace in which it is valid. The workspace generated in the Command Window is known as the base workspace. As we know

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

FOR Loop: The for loop, or the for statement, is used whenever it is essential to repeat statement(s) in the script or function, and whenever it is known ahead of time how man


Finding products by for loop: an illustration, when 5 is passed to be the value of the input argument n, the function will compute and return 1 + 2 + 3 + 4 + 5, or 15: >> s

I have a vector of X, one for Y , one for x-direction velocity U and one for y-direction velocity V. they are at same size. How can I plot streamline of that flow? I follow all exa

Creating Cell arrays: There are many ways to create cell arrays. For illustration, we will create a cell array in which one element will store an integer, one element store ch

Algorithm for the function e: The algorithm for the function eoption is as shown: Use the menu function to show the 4 choices. Error-check (an error would take place