代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
例9-25 .m
t=0:-001:2*pi
x=sin(3*t)
y=hilbert(x)
%同时显示原始数据图像和变换后数据图像
plot(t,real(y),':',t,imag(y))
例5-1.m
>> a1=axes; %创建第一个区域位于窗口上方
>> set(a1,'position',[0.05 0.55 0.9 0.4]); %定位于窗口上方
>> a2=axes; %创建第二个区域
>> set(a2,'position',[0.05 0.
例4-1.m
theta = -pi:0.01:pi; % 计算
rho(1,:) = 2 * sin(5 * theta) .^ 2;
rho(2,:) = cos(10 * theta) .^ 3;
rho(3,:) = sin(theta) .^ 2;
rho(4,:) = 5 * cos(3.5 * theta) .^ 3;
for k = 1:4
po
例2-60.m
>> x=[1 ;3; 5; 7; 9];
>> y=fft(x)
>> t=0:0.02:1; %波形方程
>> x=sin(2*pi*20*t)+sin(2*pi*12*t);
>> y=fft(x); %经过傅立叶变换观察其模数和相位
>> m=abs(y
gamicheval.m
function [sol,val] = gaMichEval(sol,options)
val = 21.5 + sol(1) * sin(4*pi*sol(1)) + sol(2)*sin(20*pi*sol(2));
%G=zeros(0);
%val = sqrt(sol(1)) * sin(2*sol(1)) + sqrt(sol(1))*cos(5*sol(1))+5;
chap2_7s.m
function [sys,x0,str,ts] = spacemodel(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 3,
sys=mdlOutputs(t,x,u);
case {2,4,9}
sys=[];
otherwise
erro
chap2_1eq.m
function dx=PlantModel(t,x,flag,para)
global S A F c alfa beta
dx=zeros(2,1);
S=1;
if S==1
rin=1.0;
drin=0;
elseif S==2
A=0.5;F=3;
rin=A*sin(F*2*pi*t);
drin=A*F*2*pi*cos(F*2
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
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));
}