在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4393|回复: 7

从.m文件中怎么导出滤波器的系数!!!请教高手赐招

[复制链接]
发表于 2010-4-30 22:28:43 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 eecsseudl 于 2013-4-29 10:01 编辑

下面是我写一个关于cic和cic补偿的一个.m程序 但是怎么导出系数呢?
我在网上看到有朋友用fvtool工具导出,我用了(最后一行程序),但有好多啊 我觉得不像;
我知道用fdatool工具能导出来,但是现在.m文件中怎么导呢?
fs = 96e3;   %采样频率
fpass = 4e3; %  通带截止.
m = 6;  % 抽取因子.      
hcic = design(fdesign.decimator(m,'cic',1,fpass,60,fs)); %%cic
hd = cascade(dfilt.scalar(1/gain(hcic)),hcic);
hd(2) = design(fdesign.ciccomp(hcic.differentialdelay, ...
            hcic.numberofsections,fpass,4.5e3,.1,60,fs/m)); %%cic补偿
fvtool(hd(1),hd(2),...
cascade(hd(1),hd(2)),'Fs',[96e3 96e3/m 96e3])
fvtool(hd(2))


下面是用fvtool导出的系数,大家一起看看 对吗?我觉得量化有问题 ,如果是对的,那量化两天不完。
0.0 0.0 0.0
0.5019607843137255 0.0 0.0
0.0 0.5019607843137255 0.0
0.5019607843137255 0.5019607843137255 0.0
0.0 0.0 0.5019607843137255
0.5019607843137255 0.0 0.5019607843137255
0.0 0.5019607843137255 0.5019607843137255
0.7529411764705882 0.7529411764705882 0.7529411764705882
0.7529411764705882 0.8627450980392157 0.7529411764705882
0.6509803921568628 0.792156862745098 0.9411764705882353
0.25098039215686274 0.12549019607843137 0.0
0.3764705882352941 0.12549019607843137 0.0
0.5019607843137255 0.12549019607843137 0.0
0.6274509803921569 0.12549019607843137 0.0
0.7529411764705882 0.12549019607843137 0.0
0.8784313725490196 0.12549019607843137 0.0
0.0 0.25098039215686274 0.0
0.12549019607843137 0.25098039215686274 0.0
0.25098039215686274 0.25098039215686274 0.0
0.3764705882352941 0.25098039215686274 0.0
0.5019607843137255 0.25098039215686274 0.0
0.6274509803921569 0.25098039215686274 0.0
0.7529411764705882 0.25098039215686274 0.0
0.8784313725490196 0.25098039215686274 0.0
0.0 0.3764705882352941 0.0
0.12549019607843137 0.3764705882352941 0.0
0.25098039215686274 0.3764705882352941 0.0
0.3764705882352941 0.3764705882352941 0.0
0.5019607843137255 0.3764705882352941 0.0
0.6274509803921569 0.3764705882352941 0.0
0.7529411764705882 0.3764705882352941 0.0
0.8784313725490196 0.3764705882352941 0.0
0.0 0.5019607843137255 0.0
0.12549019607843137 0.5019607843137255 0.0
0.25098039215686274 0.5019607843137255 0.0
0.3764705882352941 0.5019607843137255 0.0
0.5019607843137255 0.5019607843137255 0.0
0.6274509803921569 0.5019607843137255 0.0
0.7529411764705882 0.5019607843137255 0.0
0.8784313725490196 0.5019607843137255 0.0
0.0 0.6274509803921569 0.0
0.12549019607843137 0.6274509803921569 0.0
0.25098039215686274 0.6274509803921569 0.0
0.3764705882352941 0.6274509803921569 0.0
0.5019607843137255 0.6274509803921569 0.0
0.6274509803921569 0.6274509803921569 0.0
0.7529411764705882 0.6274509803921569 0.0
0.8784313725490196 0.6274509803921569 0.0
0.0 0.7529411764705882 0.0
0.12549019607843137 0.7529411764705882 0.0
0.25098039215686274 0.7529411764705882 0.0
0.3764705882352941 0.7529411764705882 0.0
0.5019607843137255 0.7529411764705882 0.0
0.6274509803921569 0.7529411764705882 0.0
0.7529411764705882 0.7529411764705882 0.0
0.8784313725490196 0.7529411764705882 0.0
0.0 0.8784313725490196 0.0
0.12549019607843137 0.8784313725490196 0.0
0.25098039215686274 0.8784313725490196 0.0
0.3764705882352941 0.8784313725490196 0.0
0.5019607843137255 0.8784313725490196 0.0
0.6274509803921569 0.8784313725490196 0.0
0.7529411764705882 0.8784313725490196 0.0
0.8784313725490196 0.8784313725490196 0.0
0.0 0.0 0.25098039215686274
0.12549019607843137 0.0 0.25098039215686274
0.25098039215686274 0.0 0.25098039215686274
0.3764705882352941 0.0 0.25098039215686274
0.5019607843137255 0.0 0.25098039215686274
0.6274509803921569 0.0 0.25098039215686274
0.7529411764705882 0.0 0.25098039215686274
0.8784313725490196 0.0 0.25098039215686274
0.0 0.12549019607843137 0.25098039215686274
0.12549019607843137 0.12549019607843137 0.25098039215686274
0.25098039215686274 0.12549019607843137 0.25098039215686274
0.3764705882352941 0.12549019607843137 0.25098039215686274
0.5019607843137255 0.12549019607843137 0.25098039215686274
0.6274509803921569 0.12549019607843137 0.25098039215686274
0.7529411764705882 0.12549019607843137 0.25098039215686274
0.8784313725490196 0.12549019607843137 0.25098039215686274
0.0 0.25098039215686274 0.25098039215686274
0.12549019607843137 0.25098039215686274 0.25098039215686274
0.25098039215686274 0.25098039215686274 0.25098039215686274
0.3764705882352941 0.25098039215686274 0.25098039215686274
0.5019607843137255 0.25098039215686274 0.25098039215686274
0.6274509803921569 0.25098039215686274 0.25098039215686274
0.7529411764705882 0.25098039215686274 0.25098039215686274
0.8784313725490196 0.25098039215686274 0.25098039215686274
0.0 0.3764705882352941 0.25098039215686274
0.12549019607843137 0.3764705882352941 0.25098039215686274
0.25098039215686274 0.3764705882352941 0.25098039215686274
0.3764705882352941 0.3764705882352941 0.25098039215686274
0.5019607843137255 0.3764705882352941 0.25098039215686274
0.6274509803921569 0.3764705882352941 0.25098039215686274
0.7529411764705882 0.3764705882352941 0.25098039215686274
0.8784313725490196 0.3764705882352941 0.25098039215686274
0.0 0.5019607843137255 0.25098039215686274
0.12549019607843137 0.5019607843137255 0.25098039215686274
0.25098039215686274 0.5019607843137255 0.25098039215686274
0.3764705882352941 0.5019607843137255 0.25098039215686274
0.5019607843137255 0.5019607843137255 0.25098039215686274
0.6274509803921569 0.5019607843137255 0.25098039215686274
0.7529411764705882 0.5019607843137255 0.25098039215686274
0.8784313725490196 0.5019607843137255 0.25098039215686274
0.0 0.6274509803921569 0.25098039215686274
0.12549019607843137 0.6274509803921569 0.25098039215686274
0.25098039215686274 0.6274509803921569 0.25098039215686274
0.3764705882352941 0.6274509803921569 0.25098039215686274
0.5019607843137255 0.6274509803921569 0.25098039215686274
0.6274509803921569 0.6274509803921569 0.25098039215686274
0.7529411764705882 0.6274509803921569 0.25098039215686274
0.8784313725490196 0.6274509803921569 0.25098039215686274
0.0 0.7529411764705882 0.25098039215686274
0.12549019607843137 0.7529411764705882 0.25098039215686274
0.25098039215686274 0.7529411764705882 0.25098039215686274
0.3764705882352941 0.7529411764705882 0.25098039215686274
0.5019607843137255 0.7529411764705882 0.25098039215686274
0.6274509803921569 0.7529411764705882 0.25098039215686274
0.7529411764705882 0.7529411764705882 0.25098039215686274
0.8784313725490196 0.7529411764705882 0.25098039215686274
0.0 0.8784313725490196 0.25098039215686274
0.12549019607843137 0.8784313725490196 0.25098039215686274
0.25098039215686274 0.8784313725490196 0.25098039215686274
0.3764705882352941 0.8784313725490196 0.25098039215686274
0.5019607843137255 0.8784313725490196 0.25098039215686274
0.6274509803921569 0.8784313725490196 0.25098039215686274
0.7529411764705882 0.8784313725490196 0.25098039215686274
0.8784313725490196 0.8784313725490196 0.25098039215686274
0.0 0.0 0.5019607843137255
0.12549019607843137 0.0 0.5019607843137255
0.25098039215686274 0.0 0.5019607843137255
0.3764705882352941 0.0 0.5019607843137255
0.5019607843137255 0.0 0.5019607843137255
0.6274509803921569 0.0 0.5019607843137255
0.7529411764705882 0.0 0.5019607843137255
0.8784313725490196 0.0 0.5019607843137255
0.0 0.12549019607843137 0.5019607843137255
0.12549019607843137 0.12549019607843137 0.5019607843137255
0.25098039215686274 0.12549019607843137 0.5019607843137255
0.3764705882352941 0.12549019607843137 0.5019607843137255
0.5019607843137255 0.12549019607843137 0.5019607843137255
0.6274509803921569 0.12549019607843137 0.5019607843137255
0.7529411764705882 0.12549019607843137 0.5019607843137255
0.8784313725490196 0.12549019607843137 0.5019607843137255
0.0 0.25098039215686274 0.5019607843137255
0.12549019607843137 0.25098039215686274 0.5019607843137255
0.25098039215686274 0.25098039215686274 0.5019607843137255
0.3764705882352941 0.25098039215686274 0.5019607843137255
0.5019607843137255 0.25098039215686274 0.5019607843137255
0.6274509803921569 0.25098039215686274 0.5019607843137255
0.7529411764705882 0.25098039215686274 0.5019607843137255
0.8784313725490196 0.25098039215686274 0.5019607843137255
0.0 0.3764705882352941 0.5019607843137255
0.12549019607843137 0.3764705882352941 0.5019607843137255
0.25098039215686274 0.3764705882352941 0.5019607843137255
0.3764705882352941 0.3764705882352941 0.5019607843137255
0.5019607843137255 0.3764705882352941 0.5019607843137255
0.6274509803921569 0.3764705882352941 0.5019607843137255
0.7529411764705882 0.3764705882352941 0.5019607843137255
0.8784313725490196 0.3764705882352941 0.5019607843137255
0.0 0.5019607843137255 0.5019607843137255
0.12549019607843137 0.5019607843137255 0.5019607843137255
0.25098039215686274 0.5019607843137255 0.5019607843137255
0.3764705882352941 0.5019607843137255 0.5019607843137255
0.5019607843137255 0.5019607843137255 0.5019607843137255
0.6274509803921569 0.5019607843137255 0.5019607843137255
0.7529411764705882 0.5019607843137255 0.5019607843137255
0.8784313725490196 0.5019607843137255 0.5019607843137255
0.0 0.6274509803921569 0.5019607843137255
0.12549019607843137 0.6274509803921569 0.5019607843137255
0.25098039215686274 0.6274509803921569 0.5019607843137255
0.3764705882352941 0.6274509803921569 0.5019607843137255
0.5019607843137255 0.6274509803921569 0.5019607843137255
0.6274509803921569 0.6274509803921569 0.5019607843137255
0.7529411764705882 0.6274509803921569 0.5019607843137255
0.8784313725490196 0.6274509803921569 0.5019607843137255
0.0 0.7529411764705882 0.5019607843137255
0.12549019607843137 0.7529411764705882 0.5019607843137255
0.25098039215686274 0.7529411764705882 0.5019607843137255
0.3764705882352941 0.7529411764705882 0.5019607843137255
0.5019607843137255 0.7529411764705882 0.5019607843137255
0.6274509803921569 0.7529411764705882 0.5019607843137255
0.7529411764705882 0.7529411764705882 0.5019607843137255
0.8784313725490196 0.7529411764705882 0.5019607843137255
0.0 0.8784313725490196 0.5019607843137255
0.12549019607843137 0.8784313725490196 0.5019607843137255
0.25098039215686274 0.8784313725490196 0.5019607843137255
0.3764705882352941 0.8784313725490196 0.5019607843137255
0.5019607843137255 0.8784313725490196 0.5019607843137255
0.6274509803921569 0.8784313725490196 0.5019607843137255
0.7529411764705882 0.8784313725490196 0.5019607843137255
0.8784313725490196 0.8784313725490196 0.5019607843137255
0.0 0.0 0.7529411764705882
0.12549019607843137 0.0 0.7529411764705882
0.25098039215686274 0.0 0.7529411764705882
0.3764705882352941 0.0 0.7529411764705882
0.5019607843137255 0.0 0.7529411764705882
0.6274509803921569 0.0 0.7529411764705882
0.7529411764705882 0.0 0.7529411764705882
0.8784313725490196 0.0 0.7529411764705882
0.0 0.12549019607843137 0.7529411764705882
0.12549019607843137 0.12549019607843137 0.7529411764705882
0.25098039215686274 0.12549019607843137 0.7529411764705882
0.3764705882352941 0.12549019607843137 0.7529411764705882
0.5019607843137255 0.12549019607843137 0.7529411764705882
0.6274509803921569 0.12549019607843137 0.7529411764705882
0.7529411764705882 0.12549019607843137 0.7529411764705882
0.8784313725490196 0.12549019607843137 0.7529411764705882
0.0 0.25098039215686274 0.7529411764705882
0.12549019607843137 0.25098039215686274 0.7529411764705882
0.25098039215686274 0.25098039215686274 0.7529411764705882
0.3764705882352941 0.25098039215686274 0.7529411764705882
0.5019607843137255 0.25098039215686274 0.7529411764705882
0.6274509803921569 0.25098039215686274 0.7529411764705882
0.7529411764705882 0.25098039215686274 0.7529411764705882
0.8784313725490196 0.25098039215686274 0.7529411764705882
0.0 0.3764705882352941 0.7529411764705882
0.12549019607843137 0.3764705882352941 0.7529411764705882
0.25098039215686274 0.3764705882352941 0.7529411764705882
0.3764705882352941 0.3764705882352941 0.7529411764705882
0.5019607843137255 0.3764705882352941 0.7529411764705882
0.6274509803921569 0.3764705882352941 0.7529411764705882
0.7529411764705882 0.3764705882352941 0.7529411764705882
0.8784313725490196 0.3764705882352941 0.7529411764705882
0.0 0.5019607843137255 0.7529411764705882
0.12549019607843137 0.5019607843137255 0.7529411764705882
0.25098039215686274 0.5019607843137255 0.7529411764705882
0.3764705882352941 0.5019607843137255 0.7529411764705882
0.5019607843137255 0.5019607843137255 0.7529411764705882
0.6274509803921569 0.5019607843137255 0.7529411764705882
0.7529411764705882 0.5019607843137255 0.7529411764705882
0.8784313725490196 0.5019607843137255 0.7529411764705882
0.0 0.6274509803921569 0.7529411764705882
0.12549019607843137 0.6274509803921569 0.7529411764705882
0.25098039215686274 0.6274509803921569 0.7529411764705882
0.3764705882352941 0.6274509803921569 0.7529411764705882
0.5019607843137255 0.6274509803921569 0.7529411764705882
0.6274509803921569 0.6274509803921569 0.7529411764705882
0.7529411764705882 0.6274509803921569 0.7529411764705882
0.8784313725490196 0.6274509803921569 0.7529411764705882
0.0 0.7529411764705882 0.7529411764705882
0.12549019607843137 0.7529411764705882 0.7529411764705882
0.25098039215686274 0.7529411764705882 0.7529411764705882
0.3764705882352941 0.7529411764705882 0.7529411764705882
0.5019607843137255 0.7529411764705882 0.7529411764705882
0.6274509803921569 0.7529411764705882 0.7529411764705882
1.0 0.984313725490196 0.9411764705882353
0.6274509803921569 0.6274509803921569 0.6431372549019608
0.5019607843137255 0.5019607843137255 0.5019607843137255
1.0 0.0 0.0
0.0 1.0 0.0
1.0 1.0 0.0
0.0 0.0 1.0
1.0 0.0 1.0
0.0 1.0 1.0
1.0 1.0 1.0







发表于 2010-5-1 16:51:51 | 显示全部楼层
看了真头晕
发表于 2010-5-1 23:01:57 | 显示全部楼层
帮顶,

帮顶,

帮顶,

帮顶,







 楼主| 发表于 2010-5-2 20:23:57 | 显示全部楼层
怎么没人接招呢 伤心啊
 楼主| 发表于 2010-5-2 20:25:05 | 显示全部楼层
怎么没有人做过吗? 这个...
 楼主| 发表于 2010-5-9 21:11:56 | 显示全部楼层
怎么没人定啊 伤心
发表于 2010-7-24 15:58:12 | 显示全部楼层
matlab可以自动生成HDL
查帮助
发表于 2010-7-24 16:00:25 | 显示全部楼层
matlab可以自动的做量化这个工作
你实在不想要他自动量化
你可以写一个程序,让程序区帮你量化
最简单的,把所有系数,乘以2^n,然后floor一下……
为了检查对不对
把量化之后的系数做一个FFT和最开始的浮点数的系数做的FFT,画图简单比较一下就行了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-22 23:06 , Processed in 0.031050 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表