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

📄 j134org.m

📁 很实用的在matlab环境下的图像处理源程序代码
💻 M
字号:
function [z,gz,hz] = j134org(x,varargin) 
% example 13.4 of Optimization of Chemical Processes. 
% x = [c1 c2 c3 ... r1 r2 r3 ... theta1 theta2 theta3 ...]' 
%
% Calculating the criterion z (output concentration from last reactor)
% and eventually its 1. and 2. derivatives with respect to x

[m,n]=size(x); 
% fprintf(1,'%7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f \n',x);

tanks=m/3;

% scaling
  en=ones(1,tanks);
  xscaling=diag([ en 0.01*en 100*en]);
  x = xscaling*x;
% end scaling

z=x(m/3,:);	% output concentration from last reactor
  
if nargout > 1 
  gz=zeros(1,m); % gradient 
  gz(1,m/3)=1;
  gz = xscaling * gz';	% scale and transpose  
end 
 
if nargout > 2 
   hz=zeros(m,m); % hessian
   hz = xscaling * hz * xscaling; % scale
end 
 
return 


⌨️ 快捷键说明

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