| 5 | 1/1 | 返回列表 |
| 查看: 791 | 回復(fù): 4 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
baobiao007木蟲 (職業(yè)作家)
中國特色
|
[交流]
【分享】線性卷積c程序 已有3人參與
|
||
|
#include /* y(n)=x(n)*h(n) m--length of x(n); n--length of h(n); l=m+n-1 length of y(n) */ void conv(float x[],int m,float h[],int n,float y[],int l) { int i,j,k; for(i=0; i y=0.0; for(j=0; j if(k>=0 && k } } } void main() { //參數(shù)m,n,a1,a2,b1,b2,x[],h[]可任意改動(dòng) const int m=3;//length of x(n) const int n=3;//length of h(n) const int l=m+n-1;//length of y(n) const int a1=0;//x(n)左下標(biāo),表示x(n)={x(0),x(1),x(2)} const int a2=2;//x(n)右下標(biāo) const int b1=4;//h(n)左下標(biāo),h(n)={h(4),h(5),h(6)} const int b2=6;//h(n)右下標(biāo) int c1;//卷積結(jié)果序列的左下標(biāo) int c2;//卷積結(jié)果序列的右下標(biāo) int i; float x[m]={1,1,1}; float h[n]={1,1,1}; float y[l]; c1=a1+b1; c2=a2+b2; conv(x,m,h,n,y,l); printf("result:\n" ;for(i=0; i } |

木蟲 (正式寫手)
木蟲村村委書記

木蟲 (職業(yè)作家)
中國特色

木蟲 (職業(yè)作家)
中國特色

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 311求調(diào)劑 +6 | 冬十三 2026-03-18 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 284求調(diào)劑 +5 | Zhao anqi 2026-03-22 | 5/250 |
|
|
[考研] 一志愿中南化學(xué)(0703)總分337求調(diào)劑 +9 | niko- 2026-03-19 | 10/500 |
|
|
[考研] 求調(diào)劑院校信息 +6 | CX 330 2026-03-21 | 6/300 |
|
|
[考研] 269專碩求調(diào)劑 +6 | 金恩貝 2026-03-21 | 6/300 |
|
|
[考研] 318求調(diào)劑 +4 | plum李子 2026-03-21 | 7/350 |
|
|
[考研] 生物學(xué)一志愿985,分?jǐn)?shù)349求調(diào)劑 +4 | zxts12 2026-03-21 | 7/350 |
|
|
[考研] 材料學(xué)碩301分求調(diào)劑 +7 | Liyouyumairs 2026-03-21 | 7/350 |
|
|
[考研] 考研調(diào)劑 +3 | 呼呼?~+123456 2026-03-21 | 3/150 |
|
|
[考研] 求助 +5 | 夢(mèng)里的無言 2026-03-21 | 6/300 |
|
|
[考研] 299求調(diào)劑 +4 | 某某某某位 2026-03-21 | 4/200 |
|
|
[考研] 求調(diào)劑 +6 | Mqqqqqq 2026-03-19 | 6/300 |
|
|
[考研] 二本跨考鄭大材料306英一數(shù)二 +3 | z1z2z3879 2026-03-17 | 3/150 |
|
|
[考研] 一志愿中海洋材料工程專碩330分求調(diào)劑 +8 | 小材化本科 2026-03-18 | 8/400 |
|
|
[考研] 一志愿武漢理工材料工程專碩調(diào)劑 +9 | Doleres 2026-03-19 | 9/450 |
|
|
[考研] 材料學(xué)碩297已過四六級(jí)求調(diào)劑推薦 +11 | adaie 2026-03-19 | 11/550 |
|
|
[考研]
|
簡(jiǎn)木ChuFront 2026-03-19 | 8/400 |
|
|
[考研] 求調(diào)劑 +3 | eation27 2026-03-20 | 3/150 |
|
|
[考研] 0703化學(xué)調(diào)劑 +4 | 18889395102 2026-03-18 | 4/200 |
|
|
[考研] 286求調(diào)劑 +6 | lemonzzn 2026-03-16 | 10/500 |
|