| 5 | 1/1 | 返回列表 |
| 查看: 788 | 回復(fù): 4 | |||
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è)作家)
中國特色

新蟲 (初入文壇)
| 5 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 328求調(diào)劑,英語六級(jí)551,有科研經(jīng)歷 +5 | 生物工程調(diào)劑 2026-03-17 | 9/450 |
|
|---|---|---|---|---|
|
[基金申請(qǐng)] 山東省面上項(xiàng)目限額評(píng)審 +3 | 石瑞0426 2026-03-19 | 3/150 |
|
|
[考研] 一志愿南大,0703化學(xué),分?jǐn)?shù)336,求調(diào)劑 +3 | 收到VS 2026-03-21 | 3/150 |
|
|
[考研] 0703化學(xué)297求調(diào)劑 +3 | Daisy☆ 2026-03-20 | 3/150 |
|
|
[考研] 313求調(diào)劑 +4 | 肆叁貳壹22 2026-03-19 | 4/200 |
|
|
[考研] 296求調(diào)劑 +4 | www_q 2026-03-20 | 4/200 |
|
|
[考研] 306求0703調(diào)劑一志愿華中師范 +5 | 紙魚ly 2026-03-21 | 5/250 |
|
|
[考研] 299求調(diào)劑 +4 | 某某某某位 2026-03-21 | 4/200 |
|
|
[考研] 22 350 本科985求調(diào)劑,求老登收留 +3 | 李軼男003 2026-03-20 | 3/150 |
|
|
[考研] 301求調(diào)劑 +10 | yy要上岸呀 2026-03-17 | 10/500 |
|
|
[考研] 083200學(xué)碩321分一志愿暨南大學(xué)求調(diào)劑 +3 | innocenceF 2026-03-17 | 3/150 |
|
|
[考研] 085700資源與環(huán)境308求調(diào)劑 +12 | 墨墨漠 2026-03-18 | 13/650 |
|
|
[考研] 材料 336 求調(diào)劑 +3 | An@. 2026-03-18 | 4/200 |
|
|
[考研]
|
.6lL 2026-03-18 | 8/400 |
|
|
[考研] 考研調(diào)劑求學(xué)校推薦 +3 | 伯樂29 2026-03-18 | 5/250 |
|
|
[考研] 招收調(diào)劑碩士 +4 | lidianxing 2026-03-19 | 12/600 |
|
|
[考研] 收復(fù)試調(diào)劑生 +4 | 雨后秋荷 2026-03-18 | 4/200 |
|
|
[考研] 301求調(diào)劑 +4 | A_JiXing 2026-03-16 | 4/200 |
|
|
[考研] 290求調(diào)劑 +3 | p asserby. 2026-03-15 | 4/200 |
|
|
[考研] 275求調(diào)劑 +4 | 太陽花天天開心 2026-03-16 | 4/200 |
|