⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sb2sldat.m

📁 数字通信第四版原书的例程
💻 M
字号:
%SB2SLDAT is a script file that includes some constant matrices and vectors.
%	This script is called by SB2SLMNG and READSB.

% Copyright (c) 1990-93 by The MathWorks, Inc.
% $Revision: 1.15 $  $Date: 1993/06/09 22:09:40 $

% pointer
% blanket
% str_ori
% block 
% face
%use pointer references the location in the block
% so block(point(n,m),:) is the associated block name
% pointer, a 14X10 matrix
pointer = [ 2  3  4  1  1  1  1  1  1  1   %1
            5  6  7  8  9 10 11 12  1  1   %2
           72 13 14 15 16 73 17 18 19 20   %3
           21 22 23 24 25 26 27 28 29 30   %4
           31 32 33 34 35 36 37 38  1  1   %5
           39 40 40 40 40 40 40 40 40 40   %6
           41  1  1  1  1  1  1  1  1  1   %7
           42 43 44 45 46 47  1  1  1  1   %8
           48 49 50 51 52 53  1  1  1  1   %9
           54 55 56 57 58 59 60  1  1  1   %10
           61 62 63 64 65 66 67  1 68 69   %11
            1  1  1  1  1  1  1  1  1  1   %12
           70  1  1  1  1  1  1  1  1  1   %13
           71  1  1  1  1  1  1  1  1  1   %14
           1   1  1  1  1  1  1  1  1  1   %15
           1   1  1  1  1  1  1  1  1  1   %16
];

%blank in blankt to matchup the dimension if it is needed
blankt='                                        ';

block = [
'Illigal            '		%1        not exist%
'group              '		%2 ;1,1;  super block%
'S-function         '		%3 ;1,2;  condition block
'Note               '		%4 ;1,3;  text block%
'Fcn                '		%5 ;2,1;  general algebraic%
'Sum                '		%6 ;2,2;  summation%
'Fcn                '		%7 ;2,3;  polynomial%
'Product            '		%8 ;2,4;  product%
'Product            '		%9 ;2,5;  dot product%
'Product            '		%10;2,6;  cross product%
'Fcn                '		%11;2,7;  divide%
'Fcn                '		%12;2,8;  round up%
'Dead Zone          '		%13;3,2;  dead band
'Saturation         '		%14;3,3;  saturation%
'Saturation         '		%15;3,4;  limiter%
'Abs                '           %16;3,5;  absolute value%
'Fcn                '		%17;3,7;  quantizer%
'Look Up Table      '		%18;3,8;  preload%
'Look Up Table      '		%19;3,9;  linear interpreter%
'S-function         '		%20;3,10; multi linear interpreter?
%All dynamics function 21~30 has the same code when it is continuous time
%or discrete time one need to use name_in(1) to tell whether it is
%discrete or continuous time.
'State-space        '		%21;4,1;  state space (a,b,c,d)%
'Transfer Fcn       '		%22;4,2;  polynomial rational%
'Zero-Pole          '		%23;4,3;  zero pole%
'Transfer Fcn       '		%24;4,4;  gain dumping%
'Integrator         '		%25;4,5;  intergrate?
'Backlash           '		%26;4,6;  hysteresis?
'Transport Delay    '		%27;4,7;  time delay?
'S-function         '		%28;4,8;  limited integrator?
'S-function         '		%29;4,9;  PID controller?
'Transfer Fcn       '		%30;4,10; spring cart?
'Fcn                '		%31;5,1;  sinusoid function%
'Fcn                '		%32;5,2;  cosine function%
'Fcn                '		%33;5,3;  actangenty function%
'Fcn                '		%34;5,4;  sin(act)%
'Fcn                '		%35;5,5;  cos(act)%
'Fcn                '		%36;5,6;  asin%
'Fcn                '		%37;5,7;  cos(asin)%
'Fcn                '		%38;5,8;  acos%
'S-function         '		%39;6,1;  user defined block #1
'S-function         '		%40;6,2;  user defined block #2
'Gain               '		%41;7,1;  gain block%
'Fcn                '		%42;8,1;  sqrt%
'Fcn                '		%43;8,2;  logarithm%
'Fcn                '		%44;8,3;  exponential with e%
'Fcn                '		%45;8,4;  power 2%
'Fcn                '		%46;8,5;  exponential with 10%
'Fcn                '		%47;8,6;  signed(sqrt)%
'S-function         '		%48;9,1;  card to polar%
'S-function         '		%49;9,2;  polar to card%
'S-function         '		%50;9,3;  card to polar 3D%
'S-function         '		%51;9,4;  polar to card 3D%
'Gain               '		%52;9,5;  coordinate transfer
'Gain               '		%53;9,6;  inverse coordinate transfer?
'Signal Generator   '		%54;10,1; general waveform?
'Pulse generator    '		%55;10,2; pulse train waveform%
'Signal Generator   '		%56;10,3; square wave %
'Signal Generator   '		%57;10,4; ramp%
'Step Fcn           '		%58;10,5; step%
'Sine Wave          '		%59;10,6; sin wave%
'Signal Generator   '		%60;10,7; uniform distribute noise%
'Fcn                '		%61;11,1; general logic computation%
'Fcn                '		%62;11,2; shift register%
'Combinatorial Logic'		%63;11,3; logic OR AND NOT%
'Fcn                '		%64;11,4; logic < = > %
'Switch             '		%65;11,5; switch %
'Gain Table         '		%66;11,6; gain table%
'Stop simulation    '		%67;11,7; logic stop%
'S-function         '		%68;11,9; fuzzy logic block????
'S-function         '		%69;11,10;real time expert system???
'S-function         '		%70;13,1; block state???
'S-function         '		%71;14,1; data storage?
'Look Up Table      '		%72;3,1;  Brake%
'Look Up Table      '		%73;3,6;  2D table%
'                   '		%74 save for use
'                   '		%75 save for use
'                   '		%76 save for use
'                   '		%77 save for use
'                   '		%78 save for use
'                   '		%79 save for use
'                   '		%80 save for use
'                   '		%81 save for use
'Mux                '		%82 not SB
'Demux              '		%83 not SB
'Input              '		%84 not SB
'Output             '		%85 not SB
];

face = [
'Illigal            '		%1  not exist
'group              '		%2  super block
'condition\nblock???'		%3  condition block
'Text               '		%4  text block
'General\nAlgebraic '		%5  general algebraic
'Sum                '		%6  summation
'Polynomail         '		%7  polynomial
'Product            '		%8  product
'Dot\nProduct       '		%9  dot product
'Cross\nProduct     '		%10 cross product
'/                  '		%11 divide
'RoundUp            '		%12 round up
'Dead Zone          '		%13 dead band
'Saturation         '		%14 saturation
'Rate\nLimiter      '		%15 limiter
'abs(u)             '           %16 absolute value
'Quantizer          '		%17 quantizer
'Coulomb\nFriction  '		%18 preload
'Linear\nInterpreter'		%19 linear interpreter
'Linear\nInterpret  '		%20 multi linear interpreter
%All dynamics function 21~30 has the same code when it is continuous time
%or discrete time one need to use name_in(1) to tell whether it is
%discrete or continuous time.
'x''=Ax+Bu\ny=Cx+Du  '		%21 state space (a,b,c,d)
'N(s)\n----\nD(s)   '		%22 polynomial rational
'Z(s)\n----\nP(s)   '		%23 zero pole
'N(s)\nG------D(s)  '		%24 gain dumping
'Integrator         '		%25 intergrate
'Backlash           '		%26 Hysteresis
'Unit Delay         '		%27 time delay
'Limited Integrator '		%28 limited integrator
'PID\nController    '		%29 PID controller
'Spring\nCart       '		%30 spring cart
'sin(u)             '		%31 sinusoid function
'cos(u)             '		%32 cosine function
'arctan(u)          '		%33 actangenty function
'sin(atn(u))        '		%34 sin(act)
'cos(atn)           '		%35 cos(act)
'asin(u)            '		%36 asin
'cos(asin(u))       '		%37 cos(asin)
'acos(u)            '		%38 acos
'User\n001          '		%39 user defined block #1
'User\n002          '		%40 user defined block #2
'Gain               '		%41 gain block
'sqrt(u)            '		%42 sqrt
'log(u)             '		%43 logarithm
'   u\ne            '		%44 exponential with e
'   2\nu            '		%45 power 2
'       u\n10       '		%46 exponential with 10
'sign(sqrt(u))      '		%47 signed(sqrt)
'cart-->polar       '		%48 card to polar
'polar-->cart       '		%49 polar to card
'sphare-->polar     '		%50 card to polar 3D
'polar-->sphare     '		%51 polar to card 3D
'Gain               '		%52 coordinate transfer
'Gain               '		%53 inverse coordinate transfer
'sawtooth\nsignal   '		%54 saw tooth waveform generator
'pulse\ntrain       '		%55 pulse train waveform
'square\nwave       '		%56 square wave 
'ramp\nsignal       '		%57 ramp
'Step Fcn           '		%58 step
'Sine Wave          '		%59 sin wave
'White Noise        '		%60 uniform distribute noise
'General Logic      '		%61 general logic computation
'Register\nShift    '		%62 shift register
'Logic              '		%63 logic OR AND NOT
'< = >              '		%64 logic < = >
'Switch             '		%65 switch
'Gain\nTable        '		%66 lookup table
'Stop               '		%67 logic stop
'Fuzzy\nLogic?????? '		%68 fuzzy logic block
'Expert\nSystem???? '		%69 real time expert system
'State\nDiagram???? '		%70 block state
'Data\nStorage????? '		%71 data storage
'LookUp\nTable      '		%72 Brake
'LookUp\nTable      '		%73 2D table
'                   '		%74 save for use
'                   '		%75 save for use
'                   '		%76 save for use
'                   '		%77 save for use
'                   '		%78 save for use
'                   '		%79 save for use
'                   '		%80 save for use
'                   '		%81 save for use
'Mux                '		%82 not SB
'Demux              '		%83 not SB
'Input              '		%84 not SB
'Output             '		%85 not SB
];
fg=[2 3 8 4 6 7]; %7 3 4 3 2 7 6 7];
bg=[2 3 1 4 6 7]; %7 3 4 3 2 7 6 7];
%fg=[8 8 8 8 8 8 6 2 3 4 7 2 3 4];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -