};
try {
double scalarVal = 0.0;
Data chartData = null;
Data doubleMatrixData = input;
Object inputVal = input.getValue();
if (inputVal instanceof DoubleMatrix) {
DoubleMatrix inputValMatrix = (DoubleMatrix) inputVal;
scalarVal = inputValMatrix.getValueAt(120, 115);
double[][] doubleMatrix = (double[][]) ((DoubleMatrix) inputVal).getValue();
double[] arrayValue = doubleMatrix[120];
double[] result = new double[arrayValue.length];
int i = 0;
for (double d : arrayValue) {
if (d != 0.0) {
result[i++] = d;
}
}
chartData = new Data(input.getName(), result, new GenericDescriptor(Object.class));
doubleMatrixData = new Data(input.getName(), doubleMatrix, new GenericDescriptor(Object[].class));
}
Data scalarData = new Data(input.getName(), scalarVal, new GenericDescriptor(Number.class));
output.setValue(new Data[][] { new Data[] { doubleMatrixData, scalarData, chartData } });
} catch (UnsupportedDataTypeException e) {
LOGGER.log(Level.SEVERE, e.getMessage());
}