errors runing code compiled with library compiler matlab2015b

6 ビュー (過去 30 日間)
nourdine ouzoubair
nourdine ouzoubair 2017 年 4 月 5 日
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 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by