Deploying Java Package error - Undefined function 'matlab.io.text.internal.collectOutput' for input arguments of type 'cell'.
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello , I am trying to use Hmm based Model in java application.
tmp_file1 = tempname(); % infile
tmp_file2 = tempname(); % outfile
dlmwrite(tmp_file1, [u, v], 'delimiter', ' ', 'precision', '%.6f');
[status,result] = system(['cs2cs ' prj4_params ' < ' tmp_file1 ' > ' tmp_file2]);
if status~=0
error(['Calling cs2cs: ' result]);
end
M = dlmread(tmp_file2);
x = M(:,1);
y = M(:,2);
x = reshape(x, nx, ny);
y = reshape(y, nx, ny);
Error in eclipse:
- Error using dlmread (line 147) Undefined function 'matlab.io.text.internal.collectOutput' for input arguments of type 'cell'.
- Error in cs2cs (line 74)
- Error in my_project (line 58)
It will be nice to help to overcome this issue because I have still other function from my Matlab project to use in my java application. I am trying to use whole Matlab project in java through jar (Matlab compiler SDK) so how to solve this type of error in future ?
I tried to add collectOutput.m into my project folder.
댓글 수: 0
답변 (1개)
Nagarjuna Manchineni
2017년 3월 6일
This behavior can occur if the MCR cache becomes corrupted in between two executions. To resolve this issue, you would need to delete the directory to which the CTF is extracted, so that it would be re-extracted with the next run of the application. This directory can be obtained by typing the following at the MATLAB Command Window:
>> mcrcachedir
If the above step did not fix the issue, can you try re-installing the required MATLAB Runtime version and also re-compile the .jar file using MATLAB Compiler SDK and use this updated jar file.
Also, try the following if the issue is happening with MATLAB.
1. Check if the function 'matlab.io.text.internal.collectOutput' is on the MATLAB path
>> which -all matlab.io.text.internal.collectOutput
'matlab.io.text.internal.collectOutput' not found.
2. Since the above built-in function is not found, perform the following to restore path settings:
>> restoredefaultpath
>> rehash toolboxcache
>> savepath
3. Verify that the function is now on path:
>> which -all matlab.io.text.internal.collectOutput
MATLABROOT\toolbox\shared\io\+matlab\+io\+text\+internal\collectOutput.m % static method or package function
참고 항목
카테고리
Help Center 및 File Exchange에서 Java Package Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!