1
我有一个模型来读取文件并对其执行一些操作并将输出结果打印到文件中。我收到了一个我无法解决的错误。下面的代码显示了输入数据到2d数组的声明和赋值。错误无法展开变量
Real Data_2D[:,:]"data from input file as 2D matrix";
length := Streams.countLines(Infile)"length of the input file";
/*collect the data from input file in to 2D matrix */
for i in 1:length loop
currentLine := Streams.readLine(Infile, indexDataStart+i-1);
nextIndex := 1;
for j in 1:noColumns loop
(Data_2D[i,j],nextIndex) := Strings.scanReal(currentLine, startIndex=nextIndex,unsigned=false, message="readCoefficientsHawc2.mo c[i,j] : Real scan not successful");
end for;
end for;
我有以下错误“无法扩大vairable Data_2D”
这将是有益的verymuch如果我得到一个解决方案。
感谢您的宝贵答案。我很快就明白了。现在,我有其他问题。我得到一个错误“DAE有0个标量和0个方程”。你能帮我解决这个问题吗? –