}
if (power > maxPower)
maxPower = power;
}
DefaultTableXYDataset xyData = new DefaultTableXYDataset();
if (!onlyAll){
for (int basisVector = 0; basisVector < matrix.getRowDimension(); basisVector++) {
XYSeries xySeries = new XYSeries("Func " + basisVector, true, false);
for (int i = -stepsToOneSide; i < stepsToOneSide; i++) {
double time2 = i / (double)stepspertab;
double time = time2 * StrictMath.PI;
double sum = 0;
for (int carrier = 0; carrier < carriers; carrier++) {
double ck = matrix.get(basisVector, carrier);
double timesinc = time + (-carrier + translation) * StrictMath.PI;
double sinc = sinc(timesinc);
double value = ck * sinc;
sum += value;
}
double power = sum*sum;
xySeries.add(time2, Math.max(minDezibel, 10*Math.log10(power/maxPower)));
}
xyData.addSeries(xySeries);
}
}
XYSeries xySeriesSum = new XYSeries("Sum ", true, false);
for (int i = -stepsToOneSide; i < stepsToOneSide; i++) {
double time2 = i / (double)stepspertab;
double time = time2 * StrictMath.PI;
double power = 0;
for (int basisVector = 0; basisVector < matrix.getRowDimension(); basisVector++) {
double sum = 0;
for (int carrier = 0; carrier < carriers; carrier++) {
double ck = matrix.get(basisVector, carrier);
double timesinc = time + (-carrier + translation) * StrictMath.PI;
double sinc = sinc(timesinc);
double value = ck * sinc;
sum += value;
}
power += sum*sum;
}
xySeriesSum.add(time2, Math.max(minDezibel, 10*Math.log10(power/maxPower)));
}
xyData.addSeries(xySeriesSum);
return xyData;
}