这有没有内置的功能?
发布于 2011-11-25 04:39:37
是的,检查这个:http://www.obihiro.ac.jp/~suzukim/masuda/octave/html3/octave_36.html#SEC75
a = ["hello"; "world"];
c = cellstr (a)
⇒ c =
{
[1,1] = hello
[2,1] = world
}
>>> cellidx(c, 'hello')
ans = 1
>>> cellidx(c, 'world')
ans = 2https://stackoverflow.com/questions/8221618
复制相似问题