Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 使用engGetVariable检索MATLAB R2014a中的结构时出错_C++_C_Matlab_Struct - Fatal编程技术网

C++ 使用engGetVariable检索MATLAB R2014a中的结构时出错

C++ 使用engGetVariable检索MATLAB R2014a中的结构时出错,c++,c,matlab,struct,C++,C,Matlab,Struct,下面是makefile: Error using save Can't write file stdio. 以及MATLAB文件中的“whos”: g++ -I/usr/local/MATLAB/R2014a/extern/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"matlab_error.d" -MT"matlab_error.d" -o "matlab_error.o" "matlab_error.cpp" g++ -

下面是makefile:

Error using save
Can't write file stdio.
以及MATLAB文件中的“whos”:

g++ -I/usr/local/MATLAB/R2014a/extern/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"matlab_error.d" -MT"matlab_error.d" -o "matlab_error.o" "matlab_error.cpp"
g++ -Wl,-rpath,/usr/local/MATLAB/R2014a/bin/glnxa64 -L/usr/local/MATLAB/R2014a/bin/glnxa64 -Xlinker -rpath-link -Xlinker /usr/local/MATLAB/R2014a/bin/glnx64 -o "matlab_error"  matlab_error.o   -leng -lmx
只有在使用MATLAB版本R2014a Linux时,才会出现此错误。我试过2013a/b版,效果很好。当我尝试读取示例文件的另一个结构(如main_参数或MultiSignal)时,也会发生这种情况。 那么我的错误在哪里呢


您可能遇到同样的问题,在这种情况下,您应该使用MATLAB命令
cell2mat
将数据保存在.m文件中。否则无法从
单元格中读取数据类型。

您找到答案了吗?我用标量逻辑得到这个行为。它发生在两个独立的程序中,而在之前它工作得非常好。代码的其他部分已更改,但此部分没有更改。它似乎只是自发地停止了工作。我也在R2014a Linux上。
g++ -I/usr/local/MATLAB/R2014a/extern/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"matlab_error.d" -MT"matlab_error.d" -o "matlab_error.o" "matlab_error.cpp"
g++ -Wl,-rpath,/usr/local/MATLAB/R2014a/bin/glnxa64 -L/usr/local/MATLAB/R2014a/bin/glnxa64 -Xlinker -rpath-link -Xlinker /usr/local/MATLAB/R2014a/bin/glnx64 -o "matlab_error"  matlab_error.o   -leng -lmx
Name                       Size            Bytes  Class     Attributes

Custom_Parameters          0x0                 0  double    global    
MultiSignal                1x1             83110  struct              
PHOTOSS_TEMP1              1x1                 8  double              
PHOTOSS_TEMP3              1x1              8210  struct              
Results                    0x0                 0  double    global    
alpha                      1x1                 8  double    global    
beta2                      1x1                 8  double    global    
current_block_no           1x1                 8  double              
fiber_length               1x1                 8  double    global    
main_parameters            1x1              4644  struct    global    
message                    0x0                 0  char      global    
simulation_parameters      1x1              4644  struct