Prev: Trim command
Next: surf colormap problem
From: Donovan on 13 May 2010 18:44 Forgive me if this question has already been answered. I was not able to find it. I need to modify a string being used in a loop. string = { 'the table' } remove 'the' so that newString = { 'table' } How can I do this? Thanks for the help!
From: us on 13 May 2010 18:48 On May 14, 12:44 am, "Donovan " <creekm...(a)gmail.com> wrote: > Forgive me if this question has already been answered. I was not able to find it. > > I need to modify a string being used in a loop. > > string = { 'the table' } > > remove 'the' > so that > > newString = { 'table' } > > How can I do this? > > Thanks for the help! one of the solutions - note: you create a CELLSTR var s={'the table'}; r=strrep(s,'the ','') % r = 'table' % <- a CELLSTR % see also: regexprep us
From: Matt Fig on 13 May 2010 18:54 Or, to make it LESS general, but simpler: string = { 'the table' }; Newstring = {string{1}(5:end)}
From: Donovan on 14 May 2010 05:14 Worked perfectly, thank you!
|
Pages: 1 Prev: Trim command Next: surf colormap problem |