代码搜索结果
找到约 36,166 项符合
Raspberry Pi 的代码
ip_02_08.m
% MATLAB script for Illustrative Problem 2.8.
clear
delta_w=2*pi/100;
w=-pi:delta_w:pi; % one period of Sy
Sy=1./(1.9025-1.9*cos(w));
% Plotting command follows.
plot(w,Sy);
chap3_11f.m
function [y]=func(x1,x2,x3)
for l1=1:1:3
gs1=-[(x1+pi/6-(l1-1)*pi/6)/(pi/12)]^2;
u1(l1)=exp(gs1);
end
for l2=1:1:3
gs2=-[(x2+pi/6-(l2-1)*pi/6)/(pi/12)]^2;
u2(l2)=exp(gs2);
end
chap3_10plot.m
clear all;
close all;
L1=-pi/6;
L2=pi/6;
L=L2-L1;
T=L*1/1000;
x=L1:T:L2;
figure(1);
for i=1:1:3
gs=-[(x+pi/6-(i-1)*pi/6)/(pi/12)].^2;
u=exp(gs);
hold on;
plot(x,u);
end
xlab
chap9_7i.m
%Flight Simulator Servo System
clear all;
close all;
J=2;
b=0.5;
kv=2;
kp=15;
kd=6;
f1=(b+kd*kv);
f2=J;
F=1;
A=1;
t=[0:0.001:10]'; %Simulation time
r=A*sin(2*pi*F*t);
dr=2*pi
exp_out.c
#include
void main ()
{
float pi = 3.14159;
float radius = 2.0031;
printf("The circle's area is %e\n", 2 * pi * radius);
printf("The circle's area is %E\n", 2 * pi * r
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));
}
state.m
function xdot = state(t,x); % returns the state derivatives
A = [0 1 0; 0 0 1; -6 -11 -6];
B=[1; 1; 1];
xdot = A*x'+ B*sin(2*pi*t);
%xdot = A*x';
rec2pol.m
function Fpol = rec2pol(Frec)
Fpol = [abs(Frec) angle(Frec)*180/pi];
chp2ex5.m
R = 1; X = 7; Z = R +j*X;
V1 = 120*(cos(-5*pi/180) + j*sin(-5*pi/180));
V2 = 100+j*0;
I12 = (V1 - V2)/Z, I21 = -I12;
S12 = V1*conj(I12), S21 = V2*conj(I21)
SL = S12 + S21
PL = R*abs(I12)^2, QL =
chp10ex3.m
% (a) Solution by mesh analysis
Zs=j*12; Zm=j*4; VL=100*sqrt(3);
Z= [(Zs-Zm) -(Zs-Zm) 0
0 (Zs-Zm) -(Zs-Zm)
1 1 1 ];
V=[VL*cos(pi/6)+j*VL*sin(pi/6)