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

📄 e472.m

📁 matlab算法集 matlab算法集
💻 M
字号:
%----------------------------------------------------------------------
% Example 4.7.2: Water Resource Management
%----------------------------------------------------------------------

   clear
   q = 40;                    % number of x plot points 
   r = 80;                    % number of y plot points  	

   x1 = zeros (q,1);
   y1 = zeros (r,1);
   Z1 = zeros (q,r);

% Get pond depth data: x,y,Z

   fprintf ('Example 4.7.2: Water Resource Management\n');
   data472                    % get pond depth data 
   show ('x',x)
   show ('y',y)
   [m,n] = size(Z);

% Evaluate surface using bilinear interpolation 
   
   for i = 1 : q
      x1(i) = x(1) + (x(m) - x(1))*(i-1)/(q - 1);
   end 	
   for j = 1 : r
      y1(j) = y(1) + (y(n) - y(1))*(j-1)/(r - 1);
   end
   Z1 = bilin (x,y,Z,x1,y1);

% Plot surface 

   plotxyz (x1,y1,Z1,'Pond Depth','x (m)','y (m)','z (m)')
%----------------------------------------------------------------------

⌨️ 快捷键说明

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