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

📄 mstripr.m

📁 用matlab编写的电磁学方面的函数和图像
💻 M
字号:
% mstripr.m - microstrip synthesis with refinement (calculates w/h from Z)
%
% Usage: [u,N] = mstripr(er,Z0,per)
%        [u,N] = mstripr(er,Z0)     (equivalent to per=0.2)
%
% er  = relative permittivity of substrate
% Z0  = desired characteristic impedance
% per = percent accuracy for Z0 and u, typically, 0.1<per<0.2
%
% u = width-to-height ratio = w/h
% N = number of refinement iterations
%
% uses mstrips and mstripa

% S. J. Orfanidis - 2000 - www.ece.rutgers.edu/~orfanidi/ewa

function [u,N] = mstripr(er,Z0,per)

if nargin==0, help mstripr; return; end
if nargin==2, per=0.2; end

Nmax = 3000;
per = per/100;

u = mstrips(er,Z0);                 % initial estimate of u 
[eff,Z] = mstripa(er,u);            % corresponding impedance

N = 0;

while 100*abs(Z-Z0)/Z0 > per,       
    if Z<=Z0,                       % Z is a decreasing function of u
        u = (1-per)*u;              % corrected u
    else
        u = (1+per)*u;
    end
    [eff,Z] = mstripa(er,u);        % corrected Z
    N = N+1;
    if N>Nmax, 
        u = mstrips(er,Z0);         % convergence failed, use initial value
        break;
    end
end


⌨️ 快捷键说明

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