forked from schormans/CuCCo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zlink.m
24 lines (21 loc) · 798 Bytes
/
zlink.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function [ zlinkval ] = zlink(config,ZL1,ZL2,M,omega,Zout,C1,C2)
%ZLINK determines Zlink based on input params
% config should be a string, either SS, SP, PS, PP. Other params are self
% explanatory
switch config
case 'SS'
%
zlinkval = ZL1 + 1./(1j*omega*C1) + ((omega.*M).^2)./(ZL2 + 1./(1j*omega*C2) + Zout);
case 'SP'
%
zlinkval = ZL1 + 1./(1j*omega*C1) + ((omega.*M).^2)./(ZL2 + 1./((1j*omega*C2) + 1./Zout));
case 'PS'
%
zlinkval = 1./(1j*omega*C1 + 1./(ZL1 + ((omega.*M).^2)./(ZL2 + 1./(1j*omega*C2) + Zout)));
case 'PP'
%
zlinkval = 1./(1j*omega*C1 + 1./(ZL1 + ((omega.*M).^2)./(ZL2 + 1./((1j*omega*C2) + 1./Zout))));
otherwise
fprintf('invalid config, must be SS, SP, PS, or PP\n');
end
end