| 5 | 1/1 | 返回列表 |
| 查看: 789 | 回復(fù): 4 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
baobiao007木蟲(chóng) (職業(yè)作家)
中國(guó)特色
|
[交流]
【分享】線性卷積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 } |

木蟲(chóng) (職業(yè)作家)
中國(guó)特色

木蟲(chóng) (職業(yè)作家)
中國(guó)特色

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

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 0856材料專碩353求調(diào)劑 +4 | NIFFFfff 2026-03-20 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 328求調(diào)劑,英語(yǔ)六級(jí)551,有科研經(jīng)歷 +5 | 生物工程調(diào)劑 2026-03-17 | 9/450 |
|
|
[考研] 求助 +5 | 夢(mèng)里的無(wú)言 2026-03-21 | 6/300 |
|
|
[考研] 297求調(diào)劑 +11 | 戲精丹丹丹 2026-03-17 | 12/600 |
|
|
[考研] 307求調(diào)劑 +3 | 余意卿 2026-03-18 | 3/150 |
|
|
[考研] 266求調(diào)劑 +3 | 哇呼哼呼哼 2026-03-20 | 3/150 |
|
|
[考研] 279分求調(diào)劑 一志愿211 +14 | chaojifeixia 2026-03-19 | 15/750 |
|
|
[考研] 330求調(diào)劑0854 +3 | assdll 2026-03-21 | 3/150 |
|
|
[考研] 301求調(diào)劑 +10 | yy要上岸呀 2026-03-17 | 10/500 |
|
|
[考研] 303求調(diào)劑 +5 | 睿08 2026-03-17 | 7/350 |
|
|
[考研] 初始318分求調(diào)劑(有工作經(jīng)驗(yàn)) +3 | 1911236844 2026-03-17 | 3/150 |
|
|
[考研] 307求調(diào)劑 +10 | 冷笙123 2026-03-17 | 10/500 |
|
|
[考研] 一志愿華中科技大學(xué),080502,354分求調(diào)劑 +5 | 守候夕陽(yáng)CF 2026-03-18 | 5/250 |
|
|
[考研] 一志愿西南交大,求調(diào)劑 +5 | 材化逐夢(mèng)人 2026-03-18 | 5/250 |
|
|
[考研] 294求調(diào)劑材料與化工專碩 +15 | 陌の森林 2026-03-18 | 15/750 |
|
|
[考研] 321求調(diào)劑 +9 | 何潤(rùn)采123 2026-03-18 | 11/550 |
|
|
[考研] 一志愿吉林大學(xué)材料學(xué)碩321求調(diào)劑 +11 | Ymlll 2026-03-18 | 15/750 |
|
|
[考研] 0703化學(xué)336分求調(diào)劑 +6 | zbzihdhd 2026-03-15 | 7/350 |
|
|
[考研] 機(jī)械專碩325,尋找調(diào)劑院校 +3 | y9999 2026-03-15 | 5/250 |
|
|
[考研] 318求調(diào)劑 +3 | Yanyali 2026-03-15 | 3/150 |
|