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

📄 simdemo.m

📁 数字通信第四版原书的例程
💻 M
📖 第 1 页 / 共 2 页
字号:

%     Finished composite block 'Library/Special/Button 1'.

set_param([sys,'/','Library/Special/Button 1'],...
		'hide name',0,...
		'position',[15,200,130,270])
set_param([sys,'/','Library/Special'],...
		'Mask Display','Special\nBlocks')


%     Finished composite block 'Library/Special'.

set_param([sys,'/','Library/Special'],...
		'hide name',0,...
		'position',[140,91,203,140])
set_param([sys,'/','Library'],...
		'Mask Display','Block Library')


%     Finished composite block 'Library'.

set_param([sys,'/','Library'],...
		'hide name',0,...
		'position',[315,205,430,275])


%     Subsystem  'Library1'.

new_system([sys,'/','Library1'])
set_param([sys,'/','Library1'],'Location',[0,56,357,338])

add_block('built-in/Note',[sys,'/',['Library1/Double click on any of ',13,'these blocks to see the ',13,'demo of your choice']])
set_param([sys,'/',['Library1/Double click on any of ',13,'these blocks to see the ',13,'demo of your choice']],...
		'position',[175,90,180,95])


%     Subsystem  'Library1/Button 4'.

new_system([sys,'/','Library1/Button 4'])
set_param([sys,'/','Library1/Button 4'],'Location',[-10,380,117,533])
set_param([sys,'/','Library1/Button 4'],...
		'Mask Display','Nonlinear\nBlocks',...
		'Mask Dialogue','eval(''nonlin'')')


%     Finished composite block 'Library1/Button 4'.

set_param([sys,'/','Library1/Button 4'],...
		'hide name',0,...
		'position',[35,155,101,208])


%     Subsystem  'Library1/Button 5'.

new_system([sys,'/','Library1/Button 5'])
set_param([sys,'/','Library1/Button 5'],'Location',[-10,380,117,533])
set_param([sys,'/','Library1/Button 5'],...
		'Mask Display','Discrete\nBlocks',...
		'Mask Dialogue','eval(''discrete'')')


%     Finished composite block 'Library1/Button 5'.

set_param([sys,'/','Library1/Button 5'],...
		'hide name',0,...
		'position',[140,155,203,208])


%     Subsystem  'Library1/Button 6'.

new_system([sys,'/','Library1/Button 6'])
set_param([sys,'/','Library1/Button 6'],'Location',[-10,380,117,533])
set_param([sys,'/','Library1/Button 6'],...
		'Mask Display','Ports',...
		'Mask Dialogue','eval(''portdemo'')')


%     Finished composite block 'Library1/Button 6'.

set_param([sys,'/','Library1/Button 6'],...
		'hide name',0,...
		'position',[240,155,302,207])


%     Subsystem  'Library1/Button 3'.

new_system([sys,'/','Library1/Button 3'])
set_param([sys,'/','Library1/Button 3'],'Location',[-10,380,117,533])
set_param([sys,'/','Library1/Button 3'],...
		'Mask Display','Linear\nBlocks',...
		'Mask Dialogue','eval(''linear'')')


%     Finished composite block 'Library1/Button 3'.

set_param([sys,'/','Library1/Button 3'],...
		'hide name',0,...
		'position',[240,30,304,80])


%     Subsystem  'Library1/Button 2'.

new_system([sys,'/','Library1/Button 2'])
set_param([sys,'/','Library1/Button 2'],'Location',[-10,380,117,533])
set_param([sys,'/','Library1/Button 2'],...
		'Mask Display','Sinks',...
		'Mask Dialogue','eval(''sinks'')')


%     Finished composite block 'Library1/Button 2'.

set_param([sys,'/','Library1/Button 2'],...
		'hide name',0,...
		'position',[140,30,203,79])


%     Subsystem  'Library1/Button 1'.

new_system([sys,'/','Library1/Button 1'])
set_param([sys,'/','Library1/Button 1'],'Location',[-10,380,117,533])
set_param([sys,'/','Library1/Button 1'],...
		'Mask Display','Sources',...
		'Mask Dialogue','eval(''sources'')')


%     Finished composite block 'Library1/Button 1'.

set_param([sys,'/','Library1/Button 1'],...
		'hide name',0,...
		'position',[35,30,100,80])
set_param([sys,'/','Library1'],...
		'Mask Display','Adaptive Control',...
		'Mask Dialogue','eval(''rlsest'')')


%     Finished composite block 'Library1'.

set_param([sys,'/','Library1'],...
		'hide name',0,...
		'position',[45,290,160,360])


%     Subsystem  'Library2'.

new_system([sys,'/','Library2'])
set_param([sys,'/','Library2'],'Location',[0,56,357,338])


%     Subsystem  'Library2/Button 1'.

new_system([sys,'/','Library2/Button 1'])
set_param([sys,'/','Library2/Button 1'],'Location',[-10,380,117,533])
set_param([sys,'/','Library2/Button 1'],...
		'Mask Display','Sources',...
		'Mask Dialogue','eval(''sources'')')


%     Finished composite block 'Library2/Button 1'.

set_param([sys,'/','Library2/Button 1'],...
		'hide name',0,...
		'position',[35,30,100,80])


%     Subsystem  'Library2/Button 2'.

new_system([sys,'/','Library2/Button 2'])
set_param([sys,'/','Library2/Button 2'],'Location',[-10,380,117,533])
set_param([sys,'/','Library2/Button 2'],...
		'Mask Display','Sinks',...
		'Mask Dialogue','eval(''sinks'')')


%     Finished composite block 'Library2/Button 2'.

set_param([sys,'/','Library2/Button 2'],...
		'hide name',0,...
		'position',[140,30,203,79])


%     Subsystem  'Library2/Button 3'.

new_system([sys,'/','Library2/Button 3'])
set_param([sys,'/','Library2/Button 3'],'Location',[-10,380,117,533])
set_param([sys,'/','Library2/Button 3'],...
		'Mask Display','Linear\nBlocks',...
		'Mask Dialogue','eval(''linear'')')


%     Finished composite block 'Library2/Button 3'.

set_param([sys,'/','Library2/Button 3'],...
		'hide name',0,...
		'position',[240,30,304,80])


%     Subsystem  'Library2/Button 6'.

new_system([sys,'/','Library2/Button 6'])
set_param([sys,'/','Library2/Button 6'],'Location',[-10,380,117,533])
set_param([sys,'/','Library2/Button 6'],...
		'Mask Display','Ports',...
		'Mask Dialogue','eval(''portdemo'')')


%     Finished composite block 'Library2/Button 6'.

set_param([sys,'/','Library2/Button 6'],...
		'hide name',0,...
		'position',[240,155,302,207])


%     Subsystem  'Library2/Button 5'.

new_system([sys,'/','Library2/Button 5'])
set_param([sys,'/','Library2/Button 5'],'Location',[-10,380,117,533])
set_param([sys,'/','Library2/Button 5'],...
		'Mask Display','Discrete\nBlocks',...
		'Mask Dialogue','eval(''discrete'')')


%     Finished composite block 'Library2/Button 5'.

set_param([sys,'/','Library2/Button 5'],...
		'hide name',0,...
		'position',[140,155,203,208])


%     Subsystem  'Library2/Button 4'.

new_system([sys,'/','Library2/Button 4'])
set_param([sys,'/','Library2/Button 4'],'Location',[-10,380,117,533])
set_param([sys,'/','Library2/Button 4'],...
		'Mask Display','Nonlinear\nBlocks',...
		'Mask Dialogue','eval(''nonlin'')')


%     Finished composite block 'Library2/Button 4'.

set_param([sys,'/','Library2/Button 4'],...
		'hide name',0,...
		'position',[35,155,101,208])

add_block('built-in/Note',[sys,'/',['Library2/Double click on any of ',13,'these blocks to see the ',13,'demo of your choice']])
set_param([sys,'/',['Library2/Double click on any of ',13,'these blocks to see the ',13,'demo of your choice']],...
		'position',[175,90,180,95])
set_param([sys,'/','Library2'],...
		'Mask Display','Inverted Pendulum\nwith\nAnimation',...
		'Mask Dialogue','eval(''penddemo'')')


%     Finished composite block 'Library2'.

set_param([sys,'/','Library2'],...
		'hide name',0,...
		'position',[180,290,295,360])


%     Subsystem  'Library3'.

new_system([sys,'/','Library3'])
set_param([sys,'/','Library3'],'Location',[0,56,357,338])

add_block('built-in/Note',[sys,'/',['Library3/Double click on any of ',13,'these blocks to see the ',13,'demo of your choice']])
set_param([sys,'/',['Library3/Double click on any of ',13,'these blocks to see the ',13,'demo of your choice']],...
		'position',[175,90,180,95])


%     Subsystem  'Library3/Button 4'.

new_system([sys,'/','Library3/Button 4'])
set_param([sys,'/','Library3/Button 4'],'Location',[-10,380,117,533])
set_param([sys,'/','Library3/Button 4'],...
		'Mask Display','Nonlinear\nBlocks',...
		'Mask Dialogue','eval(''nonlin'')')


%     Finished composite block 'Library3/Button 4'.

set_param([sys,'/','Library3/Button 4'],...
		'hide name',0,...
		'position',[35,155,101,208])


%     Subsystem  'Library3/Button 5'.

new_system([sys,'/','Library3/Button 5'])
set_param([sys,'/','Library3/Button 5'],'Location',[-10,380,117,533])
set_param([sys,'/','Library3/Button 5'],...
		'Mask Display','Discrete\nBlocks',...
		'Mask Dialogue','eval(''discrete'')')


%     Finished composite block 'Library3/Button 5'.

set_param([sys,'/','Library3/Button 5'],...
		'hide name',0,...
		'position',[140,155,203,208])


%     Subsystem  'Library3/Button 6'.

new_system([sys,'/','Library3/Button 6'])
set_param([sys,'/','Library3/Button 6'],'Location',[-10,380,117,533])
set_param([sys,'/','Library3/Button 6'],...
		'Mask Display','Ports',...
		'Mask Dialogue','eval(''portdemo'')')


%     Finished composite block 'Library3/Button 6'.

set_param([sys,'/','Library3/Button 6'],...
		'hide name',0,...
		'position',[240,155,302,207])


%     Subsystem  'Library3/Button 3'.

new_system([sys,'/','Library3/Button 3'])
set_param([sys,'/','Library3/Button 3'],'Location',[-10,380,117,533])
set_param([sys,'/','Library3/Button 3'],...
		'Mask Display','Linear\nBlocks',...
		'Mask Dialogue','eval(''linear'')')


%     Finished composite block 'Library3/Button 3'.

set_param([sys,'/','Library3/Button 3'],...
		'hide name',0,...
		'position',[240,30,304,80])


%     Subsystem  'Library3/Button 2'.

new_system([sys,'/','Library3/Button 2'])
set_param([sys,'/','Library3/Button 2'],'Location',[-10,380,117,533])
set_param([sys,'/','Library3/Button 2'],...
		'Mask Display','Sinks',...
		'Mask Dialogue','eval(''sinks'')')


%     Finished composite block 'Library3/Button 2'.

set_param([sys,'/','Library3/Button 2'],...
		'hide name',0,...
		'position',[140,30,203,79])


%     Subsystem  'Library3/Button 1'.

new_system([sys,'/','Library3/Button 1'])
set_param([sys,'/','Library3/Button 1'],'Location',[-10,380,117,533])
set_param([sys,'/','Library3/Button 1'],...
		'Mask Display','Sources',...
		'Mask Dialogue','eval(''sources'')')


%     Finished composite block 'Library3/Button 1'.

set_param([sys,'/','Library3/Button 1'],...
		'hide name',0,...
		'position',[35,30,100,80])
set_param([sys,'/','Library3'],...
		'Mask Display','Ordinary Differential\nEquation\nS-Functions',...
		'Mask Dialogue','eval(''odedemo'')')


%     Finished composite block 'Library3'.

set_param([sys,'/','Library3'],...
		'hide name',0,...
		'position',[315,290,430,360])

add_block('built-in/Note',[sys,'/','Double click on any of these blocks to see the demo of your choice'])
set_param([sys,'/','Double click on any of these blocks to see the demo of your choice'],...
		'position',[235,370,240,375])

drawnow

% Return any arguments.
if (nargin | nargout)
	% Must use feval here to access system in memory
	if (nargin > 3)
		if (flag == 0)
			eval(['[ret,x0,str,ts,xts]=',sys,'(t,x,u,flag);'])
		else
			eval(['ret =', sys,'(t,x,u,flag);'])
		end
	else
		[ret,x0,str,ts,xts] = feval(sys);
	end
else
	drawnow % Flash up the model and execute load callback
end

⌨️ 快捷键说明

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