oct文件中cell和octave_map之间的区别

时间:2014-12-04 18:31:52

标签: octave

我需要从oct文件函数中返回一个大数组的struct。我应该使用Cell数据类型还是octave_map?从文档中我无法确定哪一个更适用。

由于 词shash

1 个答案:

答案 0 :(得分:1)

如果需要结构数组(与octave_scalar_map相对),请使用octave_map。在那种情况下"内容"返回一个可能包含多个元素的Cell。

您还应该查看oct-map.h和examples / code / structdemo.cc

阅读手册部分https://www.gnu.org/software/octave/doc/interpreter/Structures-in-Oct_002dFiles.html#Structures-in-Oct_002dFiles