errors runing code compiled with library compiler matlab2015b
조회 수: 10 (최근 30일)
이전 댓글 표시
Hallo, I am trying to execute a matlab function from java code but I have this error, I don't understand the source of this error.
Code matlab compiled:
function [ COEFF,SCORE,latent] = PCAFunction( path )
Data = fileread(path);
Data = strrep(Data, ',', '.');
FID = fopen('comma2pointData.txt', 'w');
fwrite(FID, Data, 'char');
fclose(FID);
Data=importdata('comma2pointData.txt','\t');
[COEFF,SCORE,latent] = princomp(Data)
end
code in java:
String path = "/datamicro.txt";
Object[] result = null;
pcaClass pca = null;
try {
pca = new pcaClass();
result=pca.PCAFunction(3, path);
System.out.println(result[0]);
System.out.println(result[1]);
System.out.println(result[2]);
} catch (MWException ex) {
Logger.getLogger(CalculAcpFrame.class.getName()).log(Level.SEVERE, null, ex);
} finally {
pca.dispose();
MWArray.disposeArray(result);
}
Java error:
error: NoSuchMethodException sun.awt.CGraphicsDevice.getScaleFactor()
- Matlab runtime v9
- Matlab 2015b
- Netbeans 7.4
- Java jdk 1.7.0.10
- OSX Yosemite
Tks
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!