errors runing code compiled with library compiler matlab2015b

10 Ansichten (letzte 30 Tage)
nourdine ouzoubair
nourdine ouzoubair am 5 Apr. 2017
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

Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by