1
파일을 읽고 그에 대한 연산을 수행하고 출력을 파일로 인쇄하는 모델이 있습니다. 내가 해결할 수없는 오류가있다. 아래 코드는 입력 데이터를 2 차원 배열에 선언하고 지정하는 방법을 보여줍니다. 오류를 확장하지 못했습니다. 변수를 확장하지 못했습니다.
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;
은 내가 해결책을 얻을 경우 도움이 verymuch 될 것
"는 vairable Data_2D을 확장하는 데 실패했습니다"다음 오류가 발생했습니다.
귀하의 소중한 답변에 감사드립니다. 나는 그것을 곧 알아 냈다. 자, 다른 문제가 있습니다. "DAE에는 0 스칼라 및 0 등식이 있습니다."라는 오류가 있습니다. 이걸 좀 도와주세요. –