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.
No comments:
Post a Comment