在C代码中,我试图转换它(示例):
typedef struct {
float a;
float b;
} Data
typedef struct {
int num;
Data datapts[100];
float x;
float y;
} Fulldata
将此转换为MATLAB进行初始化的最佳方法是什么?
Fulldata = struct('num',0, *Insert Data structure here*, 'x',0,'y',0);
谢谢..
答案 0 :(得分:4)
Data = struct('a',0,'b',0);
Fulldata = struct('num',0,'datapts',Data,'x',0,'y',0);