many matlab script ,i colect many things about mathmatics and many method of math problem

源代码在线查看: gm(1,1).m

软件大小: 3200 K
上传用户: zhangpeng
关键词: many mathmatics problem colect
下载地址: 免注册下载 普通下载 VIP

相关代码

				q=0.6;
				n=4;
				x0=[1120,1150,1450,1710];
				g1=exp(-2/(n+1));g2=exp(2/(n+1));g3=0;
				for i=2:n
				    g4=x0(i-1)/x0(i);
				    if (g4g2)
				        g3=1+g3;
				    end
				end
				g3
				x1(1)=x0(1);c=0;d=0;e=0;f=0;
				for i=2:n
				    x1(i)=x0(i)+x1(i-1);
				    z1(i)=q*x1(i)+(1-q)*x1(i-1);
				    z2(i)=z1(i)*z1(i);
				    c=z1(i)+c;
				    d=x0(i)+d;
				    e=z1(i)*x0(i)+e;
				    f=z2(i)+f;
				end
				a=(c*d-(n-1)*e)/((n-1)*f-c*c);
				b=(d*f-c*e)/((n-1)*f-c*c);
				g=b/a;
				m=-1*n*a;
				y=(x0(1)-g)*exp(m)+g;
				x=y-x1(n);
				x
							

相关资源