【文件属性】:
文件名称:心形麦克风的增益图象-comsol中文手册
文件大小:7.02MB
文件格式:PDF
更新时间:2021-06-10 04:24:47
MATLAB
78 | 第三章 分支语句和编程设计
代码如下:
% Script file: microphone.m
%
% Purpose:
% This program plots the gain pattern of a cardioid
% microphone.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 12/10/97 S. J. Chapman Original code
%
% Define variables:
% g -- Microphone gain constant
% gain -- Gain as a function of angle
% 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
polar (theta,gain,'r-');
title ('Gain versus angle \it\theta');
图 3.7 心形麦克风的增益图象