Tuesday 17 January 2012

Matlab String Processing | Matlab String operations Concat,Substring and String Find index

Matlab string processing is very Simple.Here we looking some String Processing operation.

String : String is contain more than character.characters are alphabetical's ,numbers and special operators.

In matlab strings are stored in matrix and cell arry.

>> a = 'hai'; % This one is vector string
>> a = {'Hai','Friends'}; % cell array strings...

Con-cat Strings :

In matlab we have used two type of technique used to combine strings.
1.Using Normal square bracket.
2. strcat function (built in function on matlab)

example


>> a = 'hello';
>> b = ' world';
>> c = strcat(a,b) % for built in function

c =

hello world

>> a = [a b] % using square bracket..

a =

hello world

More Functions are below

strfind : Finding String Character .its return the index of pattern...

strmatch : Matching two string patterns.If match means it returns 1 otherwise 0.



Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...