Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个数据包,数据加载是一个数组。对于标题,我想创建一个结构,因为索引它的字段会更容易。对于传输,我需要连接结构和数组来创建一个数据包。我该怎么做?
您应该使用单元格数组:
a = 1:10; b = struct('x',1,'y',2); packet = {a, b};