Я пытаюсь прочитать файл .mat с использованием библиотеки JMatI / O в проекте Java, но когда я создаю экземпляр MatFileReader, он выдает исключение, и я не знаю, в чем может быть проблема.Вот код:
public class signalSource {
public static String filePath = "aaaaaaa.mat";
public static void main (String[] args) {
MatFileReader mfr = null;
try {
mfr = new MatFileReader(filePath);
} catch (Exception e) {
System.out.println("Error reading .mat file");
e.printStackTrace();
System.exit(1);
}
System.out.println(mfr.getContent());
}
}
И это ошибка:
com.jmatio.io.MatlabIOException: Incorrect matlab array class: single
at com.jmatio.io.MatFileReader.readMatrix(Unknown Source)
at com.jmatio.io.MatFileReader.readMatrix(Unknown Source)
at com.jmatio.io.MatFileReader.readData(Unknown Source)
at com.jmatio.io.MatFileReader.read(Unknown Source)
at com.jmatio.io.MatFileReader.<init>(Unknown Source)
at com.jmatio.io.MatFileReader.<init>(Unknown Source)
Я хочу увидеть содержимое файла, то есть группы структур, которые содержат пять переменных каждая,