public static void main(String[] args) { double dt = 1 / 1e3; for (double i = 2; i < 1.0/dt; i = i * 1.2) { double alpha = computeAlphaGivenBreakFrequency(i, dt); double alphaProperly = computeAlphaGivenBreakFrequencyProperly(i, dt); System.out.println("freq=" + i + ", alpha=" + alpha + ", alphaProperly=" + alphaProperly); } System.out.println(computeBreakFrequencyGivenAlpha(0.8, 0.006)); System.out.println(computeAlphaGivenBreakFrequencyProperly(20, 0.006)); System.out.println(computeAlphaGivenBreakFrequencyProperly(20, 0.003)); }
public static void main(String[] args) { double dt = 1 / 1e3; for (double i = 2; i < 1.0 / dt; i = i * 1.2) { double alpha = computeAlphaGivenBreakFrequency(i, dt); double alphaProperly = computeAlphaGivenBreakFrequencyProperly(i, dt); System.out.println("freq=" + i + ", alpha=" + alpha + ", alphaProperly=" + alphaProperly); } System.out.println(computeBreakFrequencyGivenAlpha(0.8, 0.006)); System.out.println(computeAlphaGivenBreakFrequencyProperly(20, 0.006)); System.out.println(computeAlphaGivenBreakFrequencyProperly(20, 0.003)); }