⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arrayfactor.java

📁 天线阵列的涉及软件
💻 JAVA
字号:
/*
 *	ArrayFactor
 *
 *	Calculate the superposed amplitude of array elements 
 *
 *	Meirong He
 *	EEE Department
 *	University of Sheffield
 *	July 2005
 */
 
public class ArrayFactor {
	
	int N;
	double d,k0;
	Complex[] I;	
	Complex A=new Complex("polar", 0, 0);  
							//A temperary comlex variable
							
			
	public ArrayFactor(Complex[] I, double d, double k0) {
		
		N=I.length;	this.d=d;	this.k0=k0;	this.I=I;
	}
		
	public double getAmplitude(double theta) { 
		
		Complex sum=new Complex("polar", 0,0);
				
		for (int i=0; i<N; i++) {	
			A=I[i].copy();
			A.multiplyComp(new Complex("polar", 1, -k0*i*d*Math.cos(theta)));
			sum.addComp(A);				
		}				
							//Superposing complex currents
			
		return 20*Math.log(sum.modu)/Math.log(10);
		
							//Return logarithm values
	}	
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -