📄 zhidaoxiancapacity.m
字号:
clear;
syms z;
epslon=8.854*10^(-12);
snn=int(1/sqrt(0.01^2+z^2),z,-0.5,0.5);
snn1=double(snn);
%%set the elements of s
M=3;
for m=1:M
for n=1:M
if (m==n)
s(m,n)=snn1;
else
s(m,n)=1/abs(m-n);
end
end
end
b=ones(M,1);
q=inv(s)*b;
B=1:M;
plot(B,q);xlabel('the length of the wire'),ylabel('the charge distribution along the line');
title('the charge distribution of the wire');
a=4*pi*epslon*q;
C=sum(a)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -