| Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) | 
![]()  | 
	
| 
	 | 
| 		
			
			 | 
		#1 | 
| 
			
			 初级会员 
			
			
			
			注册日期: 2009-03-23 
				
				年龄: 37 
				
					帖子: 2
				 
				
				
				声望力: 0 ![]()  | 
	
	
	
		
		
			
			 
			
			大家好,小妹有个问题请教你们。 
		
		
		
		
		
		
		
	四个方程组: ((t0-t1)*v)^2=z^2+y^2+(x-a)^2; ((t0-t2)*v)^2=z^2+y^2+x^2; ((t0-t3)*v)^2=z^2+(y-a/2)^2+(x-a/2)^2; ((t0-t4)*v)^2=(z-a/3)^2+y^2+(x-a/2)^2; t0,x,y,z未知 t1,t2,t3,t4,a已知 怎样用matlab求解,如果t1,t2,t3,t4可以作为参数传递的话,又怎么做啊。  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 		
			
			 | 
		#2 | 
| 
			
			 高级会员 
			
			
			
			注册日期: 2008-11-07 
				住址: 湖南长沙 
				
				
					帖子: 233
				 
				
				
				声望力: 22 ![]()  | 
	
	
	
		
		
			
			 
			
			首先,编写一个不动点迭代法的求解程序。不动点解法比较简单,同样还有牛顿法,下山法。。。不一一类举了。 
		
		
		
		
		
		
		
	function [r,n]=stablepoint(x0,eps) % 初始迭代点x0 % 迭代精度 eps % 解 r % 迭代步数 n if nargin==1 eps=1.0e-4; end r=fun(x0); n=1; tol=1; while tol>eps x0=r; r=fun(x0); tol=norm(r-x0); n=n+1; if(n>100000) disp('sum of steps is too much !'); return; end end 其中fun函数就是你需要求解的方程组。  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 		
			
			 | 
		#3 | 
| 
			
			 高级会员 
			
			
			
			注册日期: 2008-11-07 
				住址: 湖南长沙 
				
				
					帖子: 233
				 
				
				
				声望力: 22 ![]()  | 
	
	
	
		
		
			
			 
			
			用 function f=fun(x) 
		
		
		
		
		
		
		
	f(1)=... f(2)=... f(3)=... f(4)=... 最后取初值为[0,0],迭代即可。  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 |