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

📄 bpsnrzbw.m

📁 很多通信系统的matlab程序,便于修改调用
💻 M
📖 第 1 页 / 共 3 页
字号:
function [ret,x0,str,ts,xts]=bpsnrzbw(t,x,u,flag);
%BPSNRZBW	is the M-file description of the SIMULINK system named BPSNRZBW.
%	The block-diagram can be displayed by typing: BPSNRZBW.
%
%	SYS=BPSNRZBW(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 BPSNRZBW 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 BPSNRZBW with a FLAG of zero:
%	[SIZES]=BPSNRZBW([],[],[],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',[189,42,1254,319])
     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', '.000001')
set_param(sys,'Max step size', '10')
set_param(sys,'Relative error','1e-3')
set_param(sys,'Return vars',   '')


%     Subsystem  ['Diagramme',13,'empfangsseitig'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],'Location',[475,310,844,551])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'empfangsseitig/Mux']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Mux']],...
		'inputs','2',...
		'position',[185,36,220,69])


%     Subsystem  ['Diagramme',13,'empfangsseitig/Signalraumpunkte'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],'Location',[165,242,460,428])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/Plot1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/in_1']],...
		'position',[75,80,95,100])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Entries','[1 .5 .999]\/[-1.5 1.5]\/0\/0\/''y.''\/[.5 offset]\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig/Signalraumpunkte'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'position',[275,173,330,207])


%     Subsystem  ['Diagramme',13,'empfangsseitig/Trajektorie'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],'Location',[165,242,460,428])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Plot1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Plot1']],...
		'function name','eyediasi',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Mux']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Mux']],...
		'inputs','2',...
		'position',[65,70,100,105])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_2']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_2']],...
		'Port','2',...
		'position',[20,115,40,135])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_1']],...
		'position',[15,55,35,75])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],[105,90;125,90])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],[45,125;50,125;60,95])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],[40,65;45,65;45,80;60,80])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Display','plot(0,0,100,100,x,y,v,w);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Dialogue','Produce eye-pattern diagram/scatter\nplot/x-y plot with the rising edge of the second input as the decision line.|Eye-pattern plot time frame:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Line-type for x-y plot (0 for no plot):')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);[v,w]=trigicon(0,25,get_param(gcb,''orientation''),2);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Help','This plot opens one, two, or three plots by assigning the line type parameters. The scatter plot point is selected by the rising edge of a trigger signal. A decision line is drawn at the rising edge of the trigger signal.')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Entries','[2 0 1]\/[-1.5 1.5]\/0\/0\/0\/''g.''\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig/Trajektorie'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'position',[275,105,330,140])


%     Subsystem  ['Diagramme',13,'empfangsseitig/Augendiagramm'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],'Location',[121,409,416,595])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/Plot1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/in_1']],...
		'position',[75,80,95,100])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Entries','[2 0 1+offset]\/[-1.5 1.5]\/0\/''w-/r-''\/0\/2/anzahl\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig/Augendiagramm'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'position',[275,37,330,73])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'empfangsseitig/Mux1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Mux1']],...
		'inputs','2',...
		'position',[185,96,220,129])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'empfangsseitig/Constant']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Constant']],...
		'Value','Inf',...
		'position',[35,130,55,150])

add_block('built-in/Switch',[sys,'/',['Diagramme',13,'empfangsseitig/Switch']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Switch']],...
		'Threshold','1',...
		'position',[110,44,135,76])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/in_1']],...
		'position',[35,40,55,60])

add_block('built-in/Step Fcn',[sys,'/',['Diagramme',13,'empfangsseitig/Step input']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Step input']],...
		'Time','starttime',...
		'position',[35,85,55,105])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'empfangsseitig/Constant1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Constant1']],...
		'Value','0',...
		'position',[130,130,150,150])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[225,55;270,55])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[60,50;105,50])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[60,95;75,95;75,60;105,60])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[60,140;95,140;105,70])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[225,115;270,115])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[250,115;250,190;270,190])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[155,140;165,140;165,45;180,45])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[165,120;180,120])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[140,60;180,60])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[150,60;150,105;180,105])
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Display','plot(0,0,100,100,x,y)',...
		'Mask Type','Diagramme')
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Dialogue','Augendiagramm, Trajektorie und\nSignalraumpunkte.|Startzeit f黵 Plot:|Abtastwerte pro Zeitfenster (2*TS):|Offset der Entscheiderlinie zur Mitte:')
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Translate','starttime = @1;  anzahl = @2; offset = @3; [x, y] = srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Help','Dieser Block stellt die Augendiagramme, Trajektorien,\nund Signalraumpunkte auf der Sende- oder Empfangsseite dar',...
		'Mask Entries','1\/40\/.075\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'position',[875,10,930,50])


%     Subsystem  ['Diagramme',13,'sendeseitig'].

new_system([sys,'/',['Diagramme',13,'sendeseitig']])
set_param([sys,'/',['Diagramme',13,'sendeseitig']],'Location',[475,310,844,551])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'sendeseitig/Constant1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Constant1']],...
		'Value','0',...
		'position',[130,130,150,150])

add_block('built-in/Step Fcn',[sys,'/',['Diagramme',13,'sendeseitig/Step input']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Step input']],...
		'Time','starttime',...
		'position',[35,85,55,105])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/in_1']],...
		'position',[35,40,55,60])

add_block('built-in/Switch',[sys,'/',['Diagramme',13,'sendeseitig/Switch']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Switch']],...
		'Threshold','1',...
		'position',[110,44,135,76])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'sendeseitig/Constant']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Constant']],...
		'Value','Inf',...
		'position',[35,130,55,150])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'sendeseitig/Mux1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Mux1']],...
		'inputs','2',...
		'position',[185,96,220,129])


%     Subsystem  ['Diagramme',13,'sendeseitig/Augendiagramm'].

new_system([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],'Location',[121,409,416,595])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/in_1']],...
		'position',[75,80,95,100])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/Plot1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])
add_line([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Entries','[2 0 1+offset]\/[-1.5 1.5]\/0\/''w-/r-''\/0\/2/anzahl\/')


%     Finished composite block ['Diagramme',13,'sendeseitig/Augendiagramm'].

set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'position',[275,37,330,73])


%     Subsystem  ['Diagramme',13,'sendeseitig/Trajektorie'].

new_system([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],'Location',[165,242,460,428])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/in_1']],...

⌨️ 快捷键说明

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