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

📄 epromdata.asv

📁 包内有产生线性调频波、非线性调频波的源码
💻 ASV
字号:
clc;
echo off all;

h0 = figure('Color',[0.8 0.8 0.8], ...
	'PaperPosition',[20 180 500 400], ...
	'PaperUnits','points', ...
	'Position',[1 31 1023 700], ...
   'ToolBar','none');

%-----------------------------------------1.文本框----------------------------------------
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontName','黑体', ...
	'FontSize',26, ...
	'FontWeight','bold', ...
	'ListboxTop',0, ...
	'Position',[20 480 730 35], ...
	'String','EPROM文件生成模块', ...
	'Style','text', ...
	'Tag','标题文本框');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontName','楷体_GB2312', ...
	'FontSize',16, ...
	'FontWeight','bold', ...
	'ListboxTop',0, ...
	'Position',[220 460 340 20], ...
	'String','电子科技大学电子工程学院706教研室', ...
	'Style','text', ...
   'Tag','副标题文本框');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[7 380 50 25], ...
	'String','编号', ...
	'Style','text', ...
	'Tag','波形编号文本框');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[60 380 120 25], ...
	'String','EPROM地址', ...
	'Style','text', ...
	'Tag','EPROM地址文本框');

h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[5 250 100 25], ...
	'String','注意事项:', ...
	'Style','text', ...
	'Tag','注释文本框1');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',16, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[10 220 400 25], ...
	'String','*1号波形为窄脉冲线性调频信号,脉宽最多不超过60us!', ...
	'Style','text', ...
	'Tag','注释文本框2');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',16, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[10 200 415 25], ...
	'String','*2号波形为窄脉冲非线性调频信号,脉宽最多不超过60us!', ...
	'Style','text', ...
	'Tag','注释文本框3');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',16, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[10 180 365 25], ...
	'String','*3号波形为窄脉冲单频信号,脉宽最多不超过60us!', ...
	'Style','text', ...
	'Tag','注释文本框4');
h1 = uicontrol('Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
    'FontName','楷体_GB2312', ...
    'FontSize',16, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[10 160 420 25], ...
	'String','*4号波形为宽脉冲线性调频信号,脉宽最多不超过60us!', ...
	'Style','text', ...
	'Tag','注释文本框5');

ROMtext = uicontrol(	'Units','points', ...
   'BackgroundColor',[1 1 1], ...
   'FontName','Courier New', ...
	'FontSize',14, ...
	'FontWeight','bold', ...
	'ListboxTop',0, ...
	'Position',[180 420 570 26], ...
	'Style','text', ...
	'Tag','ROM文件名称文本框');

%---------------------------------------------------2.列表框------------------------------------------------
liststr={' 1     00000H-03FFFH',...
         ' 2     04000H-07FFFH',...
         ' 3     08000H-0BFFFH',...
         ' 4     0C000H-0FFFFH',...
         ' 5     10000H-13FFFH',...
         ' 6     14000H-17FFFH',...
         ' 7     18000H-1BFFFH',...
         ' 8     1C000H-1FFFFH',...
         ' 9     20000H-23FFFH',...
         '10     24000H-27FFFH',...
         '11     28000H-2BFFFH',...
         '12     2C000H-2FFFFH',...
         '13     30000H-33FFFH',...
         '14     34000H-37FFFH',...
         '15     38000H-3BFFFH',...
         '16     3C000H-3FFFFH'};
listnum=1;

filelist = uicontrol('Units','points', ...
   'BackgroundColor',[0.831372549019608 0.815686274509804 0.784313725490196], ...
   'Callback','listnum=get(gcbo,''Value'');',...
   'FontName','楷体_GB2312', ...
   'FontSize',14, ...
   'FontWeight','demi', ...
	'ListboxTop',1, ...
	'Position',[15 290 740 70], ...
   'String',liststr, ...
   'Style','listbox', ...
	'Tag','文件列表框', ...
	'Value',1);

%----------------------------------------------------3.按钮--------------------------------------------------
str1=['EPROM文件保存文件夹为'];
str2=['基本波形加载文件夹为'];
fsave=[];
filestr={'','','','','','','','','','','','','','','',''};

BUTsave2 = uicontrol(	'Units','points', ...
    'BackgroundColor',[0.925490196078431 0.913725490196078 0.847058823529412], ...
    'Callback','fsave=savedata(str1,ROMtext);',...
	'FontName','楷体_GB2312', ...
	'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[15 420 155 26], ...
	'String','输出烧写文件名', ...
    'Tag','EPROM文件保存路径按钮');
BUTload2 = uicontrol(	'Units','points', ...
    'BackgroundColor',[0.925490196078431 0.913725490196078 0.847058823529412], ...
    'Callback','[liststr,filestr]=loadfile(str2,liststr,listnum,filestr,filelist);',...
	'FontName','楷体_GB2312', ...
	'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[250 380 150 26], ...
	'String','加载基本波形', ...
    'Tag','基本波形加载按钮');
BUTpara2 = uicontrol(	'Units','points', ...
   'BackgroundColor',[0.925490196078431 0.913725490196078 0.847058823529412], ...
   'Callback','wave=epromgen(fsave,filestr);', ...
	'FontName','楷体_GB2312', ...
	'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[450 380 150 26], ...
	'String','生成烧写文件', ...
	'Tag','参数确定按钮');
BUTquit2 = uicontrol(	'Units','points', ...
	'BackgroundColor',[0.925490196078431 0.913725490196078 0.847058823529412], ...
	'Callback','close(h0);', ...
	'FontName','楷体_GB2312', ...
	'FontSize',18, ...
	'FontWeight','demi', ...
	'ListboxTop',0, ...
	'Position',[650 380 100 26], ...
	'String','结束返回', ...
   'Tag','退出按钮');

⌨️ 快捷键说明

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