From: Meedo on 13 Jun 2010 03:08 Hi, How can i replace a char by another one using its index. e.g. s='matlab' s1='a'; s2='A'; How to replace only the first a (index 2 in the s string) with A, to be ans= mAtlab Does Matlab provides this kind of string indexing?? i appreciate any comments.. Mohammad
From: Walter Roberson on 13 Jun 2010 05:42 Meedo wrote: > How can i replace a char by another one using its index. > > e.g. > > s='matlab' > s1='a'; > s2='A'; > > How to replace only the first a (index 2 in the s string) with A, to be > > ans= mAtlab > > Does Matlab provides this kind of string indexing?? > i appreciate any comments.. A(find(A='a',1)) = 'A';
|
Pages: 1 Prev: physical layer coding of wimax in matlab2007 Next: Numerical integration |