代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
c3-12.cpp
#include
#include
#include
using namespace std;
int main()
{int s=1;
double n=1,t=1,pi=0;
while((fabs(t)) > 1e-7)
{pi=pi+t;
n=n+2;
s=-s;
t=s/n;
xt3-2.cpp
#include
#include
using namespace std;
int main ( )
{float h,r,l,s,sq,vq,vz;
const float pi=3.1415926;
coutr>>h;
l=2*pi*r;
s=r*r*pi;
sq
gngauss.m
function[gsrv1,gsrv2]=gngauss(m,sgma)
if nargin==0,
m=0;sgma=1;
elseif nargin==1,
sgma=m;m=0;
end;
u=rand;
z=sgma*(sqrt(2*log(1/(1-u))));
u=rand;
gsrv1=m+z*cos(2*pi*u);
gsrv2=m+z*sin
gngauss.m
function[gsrv1,gsrv2]=gngauss(m,sgma)
if nargin==0,
m=0;sgma=1;
elseif nargin==1,
sgma=m;m=0;
end;
u=rand;
z=sgma*(sqrt(2*log(1/(1-u))));
u=rand;
gsrv1=m+z*cos(2*pi*u);
gsrv2=m
circlur_array.m
%This program print pattern for circlar Array (uniform) Antenna by giing
%N,a
%and the wavelength you work with
%if you want full pattern maultiply this pattern by any Antenna pattern
%Have a nice
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 ****
phispan.m
function T=phispan(x,phitype,dilation,uo,a,bord1,bord2,Family,par);
% USAGE T=phispan(x,phitype,dilation,uo,a,bord1,bord2)
%
% This function returns a matrix Tij that contains elements
% \phi_
exp2_3_.m
%plot绘图命令的使用
close all %关闭打开了的所有图形窗口
clc %清屏命令
clear %清除工作空间中所有变量
%定义时间范围
t=[0:pi/20:8*pi];
y=sin(t);
plot(t,y,'b:square')
% r表示线的颜色为红色,此外 y(黄色)g(绿色)b(蓝色)
%
exp2_5_.m
%图形文字标示命令的使用
clear
close all
clc
t=[0:pi/20:5*pi];
plot(t,sin(t),'r:*')
axis([0 5*pi -1.5 1.5 ])
%给x轴和y轴命名
xlabel('t(deg)')
ylabel('magnitude')
%给图形加标题
title('sine wave from zero to 5\pi')
exp2_3.m
%plot绘图命令的使用
clc %清屏命令
clear %清除工作空间中所有变量
%定义时间范围
t=[0:pi/20:9*pi];
y1=sin(t);
y2=cos(t);
plot(t,y1,t,y2)