No BSD License
-
B2(X,s)
function for Mult Fdbk BPF
-
B2w(R1,R2,R3,C1,C2,w)
function for MFBPF
-
B3(X,s)
fcn for Delyiannis BPF
-
B5(X,s)
fcn for LTC1562 BPF
-
B6(X,s)
matrix fcn for Sallen & Key BPF
-
DA2(X);
function for dc diffamp
-
DA3(RR);
function for dc diffamp
-
G1(X,s)
bpf function with matrices
-
G2a(X)
RTD function
-
G3(X,s)
Sallen & Key BPF transfer function
-
G4(X,s)
All-pass circuit function
-
G5(X,s)
buffered 60Hz notch filter
-
G6(X)
fcn for offsets.m offset analysis
-
L2(X,s)
fcn for Butterworth LPF
-
SCF(X,s)
function for SCF
-
T2(X,s)
fcn for twin-T passive notch filter
-
[A,B]=bw3(X)
-
[A,B]=vo6(X)
-
dydt=ps3(t,v,flag,A,B)
called by ODE function
-
f=c100(X)
100 Hz comparator clock generator
-
frac(x)
Fractional value of x
-
y=HWR(V1,w,t,T)
half-wave rectified sine wave
-
y=VA7(R1,R2,R3,R4,R5,R6,R9,R1...
uA733 Video Ampl analysis
-
y=ccs(R1,R2,R3,Be,E3)
constant current sources for uA733
-
y=simp3a(V,n)
Simpon's 3/8 rule integration routine
-
y=tc(Ra,Rb,Eref)
Voltage divider test circuit
-
allpass2.m
-
bpfinflpts.m
-
bpfrss3.m
-
buff60.m
-
bwdiff.m
-
bwfil3mca.m
-
centdiff.m
-
comp100.m
-
daratio.m
-
dftvivo6.m
-
diffamp.m
-
fig1819.m
-
fmcabpf1.m
-
fmcadely.m
-
fmcadiff.m
-
fmcatwint.m
-
genorm.m
-
hwrsine2.m
-
lm158pol.m
-
lm158ta.m
-
lpfrss2.m
-
ltc1562.m
-
mcabpf.m
-
mcasallen.m
-
offsets.m
-
pcyield.m
-
rtdbimod.m
-
rtdmca3.m
-
rtdrss.m
-
rtdskewmca.m
-
sakrsstf.m
-
scfbpf.m
-
senseqns.m
-
skevafmcatf.m
-
temptest.m
-
uA733.m
-
View all files
|
|
| centdiff.m |
% Centered difference approximation for sensitivities
% Ref: Numerical Methods for Engineers,
% S.C. Chapra & R.P. Canale, McGraw-Hill, 3rd ed, 1998, p.93
% File: centdiff.m; updated 11/03/06. Eliminates {Nc Nc} arrays Q and B.
%
clear;clc
E1=1;E2=-1;R1=10;R2=100;R3=10;R4=100;
RR=[R1 R2 R3 R4 E1 E2];
Vo=DA2(RR) % Differential amplifier
Nc=length(RR);dpf=0.0001;Q=1+dpf;B=1-dpf;
Qx=ones(1,Nc);Bx=ones(1,Nc);
for p=1:Nc
Qx(p)=Q;Bx(p)=B;
if p > 1;Qx(p-1)=1;Bx(p-1)=1;end;
RRx=RR.*Qx;Vr=DA2(RRx); % fore shot
RRx=RR.*Bx;Vb=DA2(RRx); % back shot
Sen1(p)=(Vr/Vo-1)/dpf; % fore shot only
Sen2(p)=(Vr-Vb)/(2*Vo*dpf); % fore and back shot; centered difference
D(p)=1e6*(Sen1(p)/Sen2(p)-1); % (Meas-True)/True = Meas/True-1
end
format short g
Sen1
Sen2
disp(' ')
disp('Error (in ppm) of Sen1 compared to the more accurate Sen2:')
disp(D)
%
% Note that the sensitivities of the two inputs E1 and E2 are not 1, as is the case for
% one input.
|
|
Contact us at files@mathworks.com