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

📄 e593.m

📁 matlab算法集 matlab算法集
💻 M
字号:
%------------------------------------------------------------------------
% Example 5.9.3: Industrial High-Temperature Oven 
%------------------------------------------------------------------------

% Initialize 

   clc
   clear
   m = 100;              % maximum iterations 
   n = 4;                % polynomial degree 
   p = 200;              % number of plot points 
   tol = 1.e-6;          % error tolerance 
   T = 293.15;           % ambient temperature (K) 
   u = 21;               % heater current 	
   alpha = 50;
   beta = 2.0e-7;
   gamma = 800;
   xmin = 1000;
   xmax = 1200;
   c = zeros (n+1,1);	% polynomial coefficients 
   z = zeros (n,1);	% polynomial roots 
   x = zeros (p,1);
   Y = zeros (p,2);
	
% Initialize coefficients 

   fprintf ('Example 5.9.3: Industrial High-Temperature Oven\n');
   c(1) = -beta; 
   c(4) = -alpha;
   c(5) = alpha*T + beta*T^4 + gamma*u^2;
   show ('Coefficients',c)

% Display function 

   for i = 1 : p
      x(i) = xmin + (i-1)*(xmax - xmin)/(p-1);
      Y(i,1) = polyval(c,x(i))/1000;
   end
   graphxy (x,Y,'The Oven Function f','x (^oK)','f(x)/1000')
  
% Compute and display roots 
 
   z = roots (c);
   show ('Roots',z)
%------------------------------------------------------------------------

⌨️ 快捷键说明

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