代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
besselshixian.m
%用零阶bessel函数近似描述圆阵的指向性(必须满足条件:N>=4*pi*r/lamda+2)
clear all;
close all;
N=60;
alpha=2*pi/N;
c=1500;
f=1500;
lamda=c/f;
r=lamda/0.4;
x=0:pi/180:pi;
y1=4*pi*r/lamda*sin(x/2);
z1=bessel(0,y1)
show_tan.c
#include
#include
void main(void)
{
double pi = 3.14159265;
printf("Tangent of pi is %f\n", tan(pi));
printf("Tangent of pi/4 is %f\n", tan(pi / 4.0));
}
ex0425.m
%用罗盘图和羽毛图绘制复向量
theta=0:0.2:2*pi;
z=sin(theta).*exp(j*theta);
compass(z)
feather(z)
ex0413.m
%用plot3三维曲线绘图
x=0:0.1:20*pi;
plot3(x,sin(x),cos(x)) %按系统默认设置绘图
ex0412.m
%在图形中用ginput将点的坐标取出,并用gtext写字符串
x=0:0.1:2*pi;
plot(x,sin(x))
[m,n]=ginput(2) %取两点坐标
gtext('2\pi') %写2π
ex0410.m
%在图形窗口中添加文字标注
x=0:0.1:2*pi;
plot(x,sin(x))
hold on
plot(x,cos(x),'ro')
title('y1=sin(x),y2=cos(x)') %添加标题
xlabel('x') %添加横坐标名
legend('sin(x)','cos(x)',4) %添加图例
text(pi,sin(pi),'x=\p
ex0422.m
%使用几种命令绘制离散数据
x=0:0.1:2*pi;
y=sin(x).*exp(-2*x);
subplot(3,1,1)
stem(x,y,'filled') %画火柴杆图
subplot(3,1,2)
stairs(x,y) %画阶梯图
subplot(3,1,3)
scatter(x,y) %画点图
ex0316.m
%求符号表达式的积分
f=sym('cos(x)');
int(f) %求不定积分
int(f,0,pi/3) %求定积分
int(f,'a','b') %求定积分
int(int(f)) %求多重积分
syms t x
g=[2*x t^2;t*sin(x) exp(x)] %创建符号矩阵
int(g) %对x求不定积分
int(g,'t') %对t求不定积分
hrollfcoef.m
% Program 3-3
% hrollfcoef.m
%
% Generate coefficients of Nyquist filter
%
% programmed by H.Harada
%
function [xh] = hrollfcoef(irfn,ipoint,sr,alfs,ncc)
%****************** variables ****