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
Splits a string : The strtok function splits a string into pieces; it can be called in many ways. The function receives one string as an input argument. It appears for the fir

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Illustration of Sorting strings: To sort on the rows rather than second dimension should be specified. >> sort(words,2) ans = Hello Hdowy Hi Gbdeo

function imread: The function imread can read an image file, for illustration a JPEG (.jpg) file. The function reads color images into a 3-dimensional matrix. >> myimage1

Cross Product: The cross or outer product a × b of two vectors a and b is defined only whenever both a and b are the vectors in three-dimensional space, that means that they b

Gauss, Gauss-Jordan elimination: For 2 × 2 systems of equations, there are well-defined, easy solution techniques. Though, for the larger systems of equations, finding solutio

Dot Product: The dot or inner product of two vectors a and b is written as a • b and is defined as  In another words, this is like matrix multiplication when multiplyi

Patch function - graphics objects: The patch function is used to generate a patch graphics object, which is made from 2-dimensional polygons. The patch is defined by its verti


Illustration of Set operations: For illustration, given the vectors as shown below: >> v1 = 2:6 v1 = 2  3  4  5  6 >> v2 = 1:2:7 v2 = 1  3  5  7