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

📄 rrctbl.m

📁 《FPGA嵌入式应用系统开发典型实例》-书的光盘资料
💻 M
字号:
%本程序将quartus产生的波形文件转换为直观的波形
clc;
clear;
fid=fopen('rrc.tbl','r');
data=fscanf(fid,'%s');
fclose(fid);
b=find(data=='=');
number=length(b)-1;
j=0;
for i=1:number
    if data(b(i)+1)== '1'
        j=j+1;
        rrc_i(j,1)=data(b(i)+3);
        rrc_i(j,2)=data(b(i)+4);
        rrc_i(j,3)=data(b(i)+5);
        
        rrc_q(j,1)=data(b(i)+6);
        rrc_q(j,2)=data(b(i)+7);
        rrc_q(j,3)=data(b(i)+8);
        
        idstemp(j) = data(b(i)+9);
        qdstemp(j) = data(b(i)+10);
    end;
end;

for i = 1:length(idstemp)
    ids(i) = hex2dec(idstemp(i));
end;

for i = 1:length(qdstemp)
    qds(i) = hex2dec(qdstemp(i));
end;

for i=1:length(rrc_i)
    irrc(i)=hex2dec(rrc_i(i,:));
end;

for i=1:length(rrc_q)
    qrrc(i)=hex2dec(rrc_q(i,:));
end;


figure(1)
subplot(2,1,1);
plot(irrc);
subplot(2,1,2);
plot(ids);

figure(2);
subplot(2,1,1);
plot(qrrc);
subplot(2,1,2);
plot(qds);


⌨️ 快捷键说明

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