| Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) | 
![]()  | 
	
| 		
			
			 | 
		#12 | 
| 
			
			 初级会员 
			
			
			
			注册日期: 2008-10-02 
				
				年龄: 17 
				
					帖子: 6
				 
				
				
				声望力: 0 ![]()  | 
	
	
	
		
		
			
			 
			
			好像图做出来了...但结果好像有点乱...我再查一遍... 
		
		
		
		
		
		
			谢谢 ![]() y=zeros(1,200); i=1; for x=0:0.01:2 a=-2;b=2; % try 200 x, get 200 y while (b-a)/2>10^(-12) c=(a+b)/2; if (x^3+x*a+a^3)*(x^3+x*c+c^3)== 0 , %c is a solution, done break; end if (x^3+x*a+a^3)*(x^3+x*c+c^3)<0 %a and c make the new interval b=c; else %c and b make the new interval a=c; end end y(i)=(a+b)/2; %new midpoint is best estimate i=i+1; disp('x='); disp (x); disp('y='); disp (y) ; end x=0:0.01:2 plot(x,y) 
				__________________ 
		
		
		
		
	我才学Matlab,不理解的过程很难过 。大家的任何帮助我都万分感激!  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 |