首页 > > 详细

讲解留学生matalb程序、matalb调试、调试matalb语言、matalb讲解、讲解matalb

clc;
clear all;
close all

syms f x;
b = 1; % ground plane spacing
w = 1.5*b; % strip width
er = 1; % substrate dielectric constant
N = 30; % number of segments on the strip
I = zeros(N);
V = ones(1,N);
zm = ((1:N)-1/2).*w/N-w/2; %matching points
for i = 1:N
f = green(x/b,1/2,zm(i)/b,1/2,er);
for k = 1:N
I(i,k) = double(int(f,x,zm(k)-w/2/N,zm(k)+w/2/N));
end;
end;

%computation of charge density vector
alpha = inv(I)*V';
q=0;
for i = 1:length(alpha)
q = q + alpha(i)*w/N;
end
zc = 1/sqrt(er)/(3e8*q) %computation of characteristic impedance

%plot of charge density
plot(zm,alpha,'k*-');


function [gr] = green(x,y,xs,ys,er)

%the value of n should be greater or equal to the number of nodes
%for proper charge density evaluation
n = 1:2:31;
temp = (sin(n.*pi*y).*sin(n.*pi*ys).*exp(-n.*pi*abs(x-xs)))./n;
gr = sum(temp)./(8.854e-12*er*pi);

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!