Thursday, February 11, 2010

I'm back and writing about strings

Hi everyone, I couldn't post anything these days because my computer have been used a lot for my mastering. But finally, I finished the simulations and now I can return to my blogs.

Let's do something with strings.

First case: you have a matrix of strings like following:

mat1 = ['john', 'Simon', 'Tonny'; 'jim', 'sam', 'phill'];

And you want a standard in the strings, look 'Simon' and 'Tonny' have capital letters ('S' and 'T').

Thus, we use convstr(.) function, as following:

mat1 = ['john', 'Simon', 'Tonny'; 'jim', 'sam', 'phill'];

mat_std_u = convstr(mat1, 'u')
mat_std_u =

! !

mat_std_l = convstr(mat1, 'l')
mat_std_l =

!john simon tonny !
! !
!jim sam phill !

And it's right now, all letters are in the same type.

If anyone wants anything more about string, ask me.

See you soon.