代码搜索结果
找到约 36,166 项符合
Raspberry Pi 的代码
ex5_19.m
t=0:pi/20:2*pi;
[x,y,z]= cylinder(2+sin(t),30);
subplot(2,2,1);
surf(x,y,z);
subplot(2,2,2);
[x,y,z]=sphere;
surf(x,y,z);
subplot(2,1,2);
[x,y,z]=peaks(30);
surf(x,y,z);
ex3_21.m
a=0;b=3*pi;
n=1000; h=(b-a)/n;
x=a; s=0;
f0=exp(-0.5*x)*sin(x+pi/6);
for i=1:n
x=x+h;
f1=exp(-0.5*x)*sin(x+pi/6);
s=s+(f0+f1)*h/2;
f0=f1;
end
s
shili05.m
function shili05
h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name','实例05');
t=0:pi/10:2*pi;
[x,y]=meshgrid(t);
subplot(2,2,1)
plot(sin(t),cos(t))
axis equal
sub
lag.m
function s=lagrange(t,n)
for i=1:n
h=2*pi/n;
x(i)=i*h;
end
s=0;
for i=1:n
l=1;
for j=1:n
if j~=i
l=l*(t-x(j))/(x(i)-x(j));
end
end
s=s+
shili06.m
function shili06
h0=figure('toolbar','none',...
'position',[200 150 450 400],...
'name','实例06');
t=0:pi/10:2*pi;
h=plot(t,sin(t));
xlabel('t=0到2\pi','fontsize',16);
ylabel('sin(t)','fon
intexp3.m
%生成基础测量数据
x=-3*pi:3*pi;
y=x;
[X,Y]=meshgrid(x,y);
R=sqrt(X.^2+Y.^2)+eps;
Z=sin(R)./R;
[dzdx,dzdy]=gradient(Z);
dzdr=sqrt(dzdx.^2+dzdy.^2);
%绘制基础数据图形
surf(X,Y,Z,abs(dzdr))
colormap(spring)
a
gngauss.m
function[g1,g2]=gngauss(m,sgma)
if nargin == 0
m=0;sgma=1;
elseif nargin == 1
m=0;sgma=1;
end;
u=rand;
z=sgma*(sqrt(2*log(1/(1-u))));
u=rand;
g1=m+z*cos(2*pi*u);
g1=m+z*sin(2*pi*u)
12-2.asv
n=[-50:1:50];
x=sin(0.125*pi.*n);
subplot(2,1,1);
stem(n,x)
title('x');
y=0;
mn1=min(n);
mn2=max(n);
n1=fix(mn1/4);
n2=fix(mn2/4);
for t=n1:1:n2
[y,n]=y+sin(0.125*pi.*n).*impseq(4*t,-50
hallen.m
clc;clear all;close all;
e=8.854e-12;%介电常数
u=pi*4e-7;%磁导率
c=3e+8;%
N=45;%段数
lambda=1;%波长
L=lambda/2;%天线长度
f=c/lambda;%频率
w=2*pi*f;%
k=2*pi/lambda;%波数
eta=120*pi;%波阻抗
a=5*10^(-3);%天线半径
d
f.m
function f = f(t,x,y)
f = exp(-t)*sin(pi*x)*cos(pi*y)*(-1+2*pi*pi);