Re: table (matrix) of strings
- From: "Ken Davis" <ken.davis@xxxxxxxxxx>
- Date: Wed, 22 Mar 2006 13:45:40 -0500
"xemi" <bartekborowicz@xxxxxxxxx> wrote in message
news:ef2d490.1@xxxxxxxxxxxxxxxxxxx
Steven Lord wrote:
Use a cell array. Search the documentation for "cell array" if
you're not
sure how to use them.
--
Steve Lord
slord@xxxxxxxxxxxxx
thx, but i have next question: how to convert from class cell to
string?:> sth similar to 'cell2mat' but for strings
Strings can be the contents of cells--cells are like containers in c++
To access cell 2 by itself... s(2).
To acces the contents of cell three... s{2} (Note the curly braces)
The contents of a cell that contains a string can be treated like any other
string.
For example...
s{1} = 'this '
s =
'this '
s{2} = 'is a string'
s =
'this ' 'is a string'
s
s =
'this ' 'is a string'
s(1)
ans =
'this '
s(2)
ans =
'is a string'
s{1}
ans =
this
s{2}
ans =
is a string
[s{:}]
ans =
this is a string
.
- References:
- table (matrix) of strings
- From: xemi
- Re: table (matrix) of strings
- From: Steven Lord
- Re: table (matrix) of strings
- From: xemi
- table (matrix) of strings
- Prev by Date: Capturing paste from a uitable
- Next by Date: Re: how to find x position
- Previous by thread: Re: table (matrix) of strings
- Next by thread: how to change GUI button shape and color
- Index(es):