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

📄 qamnyqmf.m

📁 The sample source of "Contemporary Communication Systems"
💻 M
📖 第 1 页 / 共 5 页
字号:
function [ret,x0,str,ts,xts]=qamnyqmf(t,x,u,flag);
%QAMNYQMF	is the M-file description of the SIMULINK system named QAMNYQMF.
%	The block-diagram can be displayed by typing: QAMNYQMF.
%
%	SYS=QAMNYQMF(T,X,U,FLAG) returns depending on FLAG certain
%	system values given time point, T, current state vector, X,
%	and input vector, U.
%	FLAG is used to indicate the type of output to be returned in SYS.
%
%	Setting FLAG=1 causes QAMNYQMF to return state derivatives, FLAG=2
%	discrete states, FLAG=3 system outputs and FLAG=4 next sample
%	time. For more information and other options see SFUNC.
%
%	Calling QAMNYQMF with a FLAG of zero:
%	[SIZES]=QAMNYQMF([],[],[],0),  returns a vector, SIZES, which
%	contains the sizes of the state vector and other parameters.
%		SIZES(1) number of states
%		SIZES(2) number of discrete states
%		SIZES(3) number of outputs
%		SIZES(4) number of inputs
%		SIZES(5) number of roots (currently unsupported)
%		SIZES(6) direct feedthrough flag
%		SIZES(7) number of sample times
%
%	For the definition of other parameters in SIZES, see SFUNC.
%	See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

% Note: This M-file is only used for saving graphical information;
%       after the model is loaded into memory an internal model
%       representation is used.

% the system will take on the name of this mfile:
sys = mfilename;
new_system(sys)
simver(1.3)
if (0 == (nargin + nargout))
     set_param(sys,'Location',[251,43,1260,321])
     open_system(sys)
end;
set_param(sys,'algorithm',     'RK-45')
set_param(sys,'Start time',    '0.0')
set_param(sys,'Stop time',     '999999')
set_param(sys,'Min step size', '0.000001')
set_param(sys,'Max step size', '10')
set_param(sys,'Relative error','1e-6')
set_param(sys,'Return vars',   '')


%     Subsystem  'Empf鋘ger'.

new_system([sys,'/','Empf鋘ger'])
set_param([sys,'/','Empf鋘ger'],'Location',[251,42,1259,320])

add_block('built-in/Product',[sys,'/','Empf鋘ger/Product'])
set_param([sys,'/','Empf鋘ger/Product'],...
		'hide name',0,...
		'position',[300,74,330,101])

add_block('built-in/Scope',[sys,'/','Empf鋘ger/x_eI(t)'])
set_param([sys,'/','Empf鋘ger/x_eI(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[0,440,640,540],...
		'position',[350,20,380,50])

add_block('built-in/Fcn',[sys,'/','Empf鋘ger/Fcn'])
set_param([sys,'/','Empf鋘ger/Fcn'],...
		'hide name',0,...
		'Expr','2*cos(4*pi*u)',...
		'position',[185,119,265,141])

add_block('built-in/Fcn',[sys,'/','Empf鋘ger/Fcn1'])
set_param([sys,'/','Empf鋘ger/Fcn1'],...
		'hide name',0,...
		'Expr','-2*sin(4*pi*u)',...
		'position',[185,159,265,181])

add_block('built-in/Scope',[sys,'/','Empf鋘ger/x_eQ(t)'])
set_param([sys,'/','Empf鋘ger/x_eQ(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[640,440,1280,540],...
		'position',[350,155,380,185])

add_block('built-in/Clock',[sys,'/','Empf鋘ger/Clock'])
set_param([sys,'/','Empf鋘ger/Clock'],...
		'hide name',0,...
		'position',[145,140,165,160])

add_block('built-in/Product',[sys,'/','Empf鋘ger/Product1'])
set_param([sys,'/','Empf鋘ger/Product1'],...
		'hide name',0,...
		'position',[295,213,325,237])

add_block('built-in/Inport',[sys,'/',['Empf鋘ger/gest鰎tes',13,'16-QAM-',13,'Signal']])
set_param([sys,'/',['Empf鋘ger/gest鰎tes',13,'16-QAM-',13,'Signal']],...
		'position',[25,145,45,165])

add_block('built-in/Scope',[sys,'/','Empf鋘ger/d_eI(t)'])
set_param([sys,'/','Empf鋘ger/d_eI(t)'],...
		'orientation',3,...
		'Vgain','1.500000',...
		'Hgain','25.000000',...
		'Vmax','3.000000',...
		'Hmax','50.000000',...
		'Window',[0,540,640,640],...
		'position',[540,20,570,50])

add_block('built-in/Gain',[sys,'/','Empf鋘ger/Gain2'])
set_param([sys,'/','Empf鋘ger/Gain2'],...
		'hide name',0,...
		'Gain','1/20',...
		'position',[510,77,535,103])


%     Subsystem  'Empf鋘ger/Nyquist-Filter'.

new_system([sys,'/','Empf鋘ger/Nyquist-Filter'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter'],'Location',[131,545,589,761])


%     Subsystem  'Empf鋘ger/Nyquist-Filter/Memory Impulse'.

new_system([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],'Location',[541,520,939,745])

add_block('built-in/Inport',[sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/in_1'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/in_1'],...
		'position',[35,185,55,205])

add_block('built-in/Zero-Order Hold',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/Zero-Order',13,'Hold']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/Zero-Order',13,'Hold']],...
		'Sample time','ts',...
		'position',[205,84,240,116])

add_block('built-in/Product',[sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/Product'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/Product'],...
		'position',[155,90,180,110])

add_block('built-in/Outport',[sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/out_1'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/out_1'],...
		'position',[355,130,375,150])

add_block('built-in/Constant',[sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/Constant'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/Constant'],...
		'Value','x',...
		'position',[210,155,230,175])

add_block('built-in/Switch',[sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/Switch'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/Switch'],...
		'Threshold','.5',...
		'position',[295,124,320,156])


%     Subsystem  ['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector'].

new_system([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],'Location',[419,521,808,713])

add_block('built-in/Relational Operator',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Relational',13,'Operator']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Relational',13,'Operator']],...
		'position',[135,18,165,42])

add_block('built-in/Inport',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/in_1']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/in_1']],...
		'position',[10,15,30,35])

add_block('built-in/Constant',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/one1']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/one1']],...
		'Value','thld',...
		'position',[30,135,60,155])

add_block('built-in/Relational Operator',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Relational',13,'Operator2']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Relational',13,'Operator2']],...
		'Operator','>',...
		'position',[265,23,295,47])

add_block('built-in/Relational Operator',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Relational',13,'Operator1']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Relational',13,'Operator1']],...
		'position',[200,88,230,112])

add_block('built-in/Outport',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/out_1']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/out_1']],...
		'position',[340,25,360,45])

add_block('built-in/Unit Delay',[sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Unit Delay']])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector/Unit Delay']],...
		'Sample time','ts',...
		'position',[120,87,170,103])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[300,35;335,35])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[235,100;240,100;240,40;260,40])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[170,30;260,30])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[65,145;100,145;100,35;130,35])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[100,145;180,145;180,105;195,105])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[175,95;195,95])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[35,25;130,25])
add_line([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],[45,25;45,95;115,95])
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],...
		'Mask Display','Edge\nDetector',...
		'Mask Type','Edge Detection')
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],...
		'Mask Dialogue','Rising edge detection:|Threshold:|Sampling time:',...
		'Mask Translate','thld=@1;ts=@2;')
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],...
		'Mask Help','When the input signal rising edge passed the given shreshold, this block outputs one, otherwise outputs zero.')
set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],...
		'Mask Entries','thr\/ts\/')


%     Finished composite block ['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector'].

set_param([sys,'/',['Empf鋘ger/Nyquist-Filter/Memory Impulse/discrete',13,'Rising edge',13,'detector']],...
		'position',[65,26,120,54])

add_block('built-in/Inport',[sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/in_2'])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse/in_2'],...
		'Port','2',...
		'position',[25,30,45,50])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[245,100;260,100;260,130;290,130])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[185,100;200,100])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[60,195;280,195;290,150])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[95,195;95,105;150,105])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[325,140;350,140])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[235,165;250,165;250,140;290,140])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[125,40;130,40;130,95;150,95])
add_line([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],[50,40;60,40])
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],...
		'Mask Display','1/sinc',...
		'Mask Type','Impulse',...
		'Mask Dialogue','1/sinc filter:|Holding time:|Threshold for clock pulse: ',...
		'Mask Translate','ts=@1;thr=@2;x=thr>0;')
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],...
		'Mask Help','When the threshold is greater than zero, this block outputs an impulse signal, which begins at the raising edge of the second input and lasts the holding time. The impulse holds a constant amplitude, which equals the amplitude of the first input at the begining of the impulse. A clock raising edge will trigger next impulse. When the threshold is less or equal to zero, this block faithfully outputs the first input.')
set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],...
		'Mask Entries','ts\/x\/')


%     Finished composite block 'Empf鋘ger/Nyquist-Filter/Memory Impulse'.

set_param([sys,'/','Empf鋘ger/Nyquist-Filter/Memory Impulse'],...

⌨️ 快捷键说明

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