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

📄 microphone2.m

📁 图像分割算法的Matlab源程序
💻 M
字号:
%  Script file: microphone2.m
%
%  Purpose: 
%    This program plots the gain pattern of a cardioid 
%    microphone.  This version of the program uses low-
%    level graphics commands to place the title clear 
%    of the polar plot.
%
%  Record of revisions:
%      Date       Programmer        Description of change
%      ====       ==========        =====================
%    12/10/97    S. J. Chapman      Original code 
% 1. 12/14/97    S. J. Chapman      Modified to move title
%
% Define variables:
%   g         -- Microphone gain constant
%   gain      -- Gain as a function of angle
%   H1        -- Handle of gain function line
%   theta     -- Angle from microphone axis (radians)

% Calculate gain versus angle
g = 0.5;
theta = 0:pi/20:2*pi;
gain = 2*g*(1+cos(theta));

% Plot gain
H1=polar (theta,gain,'r-');
set(H1,'LineWidth',2);
title ('\bfGain versus angle \theta');

% Now get the position of the axes, and make them
% 5 percent shorter vertically.
position = get(gca,'Position');
position(4) = 0.95*position(4);
set(gca,'Position',position');

% Get the handle of the title, and more it upwards
% by 10 percent.  
H2 = get(gca,'Title');
position = get(H2,'Position');
position(2) = 1.1*position(2);
set(H2,'Position',position);

⌨️ 快捷键说明

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