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!