Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.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
Matlab 矩阵编码器不支持订阅空矩阵_Matlab_Matrix_Matlab Coder - Fatal编程技术网

Matlab 矩阵编码器不支持订阅空矩阵

Matlab 矩阵编码器不支持订阅空矩阵,matlab,matrix,matlab-coder,Matlab,Matrix,Matlab Coder,我有一个matlab文件,运行良好 我试图用自动编码器转换它,但是我得到了一个错误 ???不支持订阅空矩阵。 ct = 0; while i <= 1800 [xx, cc, vv] = doSomething(x, somevalue, Param1, dt); %things happening ... if something flowDt(ct+1) = vv; ct = ct + 1;

我有一个matlab文件,运行良好

我试图用自动编码器转换它,但是我得到了一个错误

???不支持订阅空矩阵。

ct = 0;
while i <= 1800
        [xx, cc, vv] = doSomething(x, somevalue, Param1, dt);
        %things happening ...
        if something
           flowDt(ct+1) = vv;
           ct = ct + 1;
        end
end
现在我不知道是什么导致了这个问题:
???不支持订阅空矩阵。

flow
是一个Matlab函数。这可能就是问题所在。尝试更改该变量的名称

将变量初始化为
0
而不是空矩阵
[]

ct = 0;
while i <= 1800
        [xx, cc, vv] = doSomething(x, somevalue, Param1, dt);
        %things happening ...
        if something
           flowDt(ct+1) = vv;
           ct = ct + 1;
        end
end
flowDt = [];
然后


因此
flowDt=0
将初始化数组,使其
不为空

您是否尝试过
flowDt=0
而不是
[]
?这是一种解决方法,但是,我做了两个[],然后使其等于0,解决了。你可以发一个回复哦抱歉我缩短了名字,
flowDt = 0; was the solution