代码搜索结果
找到约 10,000 项符合
Raspberry Pi 的代码
chap2_2plant.m
function [sys,x0,str,ts]=s_function(t,x,u,flag)
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 1,
sys=mdlDerivatives(t,x,u);
case 3,
sys=mdlOutputs(t,x,u);
case {2,
stick.m
t=[1:1000];
t=mod(t,90);
tr=randn(size(t));
r=cos(t).*cos(t*6)+cos(t*9).*cos(tr*9);
x=r.*cos(t+pi/2);
y=r.*sin(t+pi/2);
H=plot(x,y,'.','markersize',2);
k=1;
xlabel('Please press "space
turning.m
t=[1:10000];
t=mod(t,90);
tr=randn(size(t));
r=cos(t).*cos(t*6)+cos(t*9).*cos(tr*9);
x=r.*cos(t+pi/2);
y=r.*sin(t+pi/2);
H=plot(x,y,'.','markersize',2);
k=1;
xlabel('Please press "spac
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;
mm2403.m
% mm2403.m
x = linspace(0,pi,20);
y = linspace(-pi,pi,20);
[xx,yy] = meshgrid(x,y);
zz = myfun(xx,yy);
mesh(xx,yy,zz)
xlabel('x'), ylabel('y')
title('Figure 24.3: myfun.m plot')
mm2614.m
% mm2614.m
x = -2*pi:pi/10:2*pi;
y = sin(x);
z = 3*cos(x);
subplot(2,1,1), plot(x,y,x,z)
title('Figure 26.14a: Two plots on the same scale.');
subplot(2,1,2), plotyy(x,y,x,z)
title('Figure 26.14b: Two
mm2611.m
% mm2611.m
z = -pi:pi/5:pi;
area([sin(z);cos(z)])
title('Figure 26.11: Stacked Area Plot')
2-5.c
#include
#define PI 3.1415926
int main( )
{
float r = 2.56;
float l, s;
l = 2*PI*r;
s = PI*r*r;
printf("l=%f\n", l);
printf("s=%f\n", s);
}
untitled0000.m
fs=20000,fa=7000;
xt=cos(2*pi*fa*t);
t=0:1/127:1
k=0:128;
xk=m*cos(2*pi*k*(fc/fs));
subplot(321);
stem(k,xk);
xk1=[zeros(1,896) xk];
subplot(322);
plot(xk1);
fs1=32,f1=5,f2=12;
xt1=2*cos(
c13-2.cpp
#include
#include
using namespace std;
int main()
{int a;
couta;
cout