import java.awt.Dimension; import java.awt.Image; abstract public class MultipathDemoSignals extends MultiPathConvolution{ public MultipathDemoSignals(Dimension dim, Image img, String problemName){ super(dim,img,problemName); } //========================================== // Demo Signals //------------------------------------------ protected double[] response101; protected double[] response110; protected int[] input101; protected int[] input110; protected double longestAndMaximumAmplitudeSymbol(double t){ double scaledT=t*a/T; if(scaledT<L-1 || scaledT>L)return 0; return (double) 0.5; } //Extra +1 is just for 101 signal protected void makeDemoSignals(){ response101=new double[tapsNumber+L+1]; response110=new double[tapsNumber+L+1]; input101=new int[tapsNumber+L+1]; input110=new int[tapsNumber+L+1]; for(int i=0; i<input101.length; i++){ input101[i]=0; input110[i]=0; } input101[0]=1; input101[2]=1; input110[0]=1; input110[1]=1; } protected void spawnParametersAfterUserApplied(){ spanParsInMPLevel(); makeDemoSignals(); convolve(input110,response110, false); convolve(input101,response101, false); displySpawnedParsInMPLevel(); simulationBlocked=false; simulateThresholding(); } } Copyright (C) 2009 Konstantin Kirillov