| 4 | 1/1 | 返回列表 |
| 查看: 884 | 回復(fù): 3 | ||
[求助]
stdafx.h是MFC中處理矩陣的函數(shù),能不能在DSP中調(diào)用。
|
|
stdafx.h是MFC中處理矩陣的函數(shù),能不能在DSP中調(diào)用。如: #include "stdafx.h" #include "math.h" ...... void CMatrixOper::fftshift(COMPLEX*Matr,int row,int colum) { COMPLEX temp; temp.im = 0; temp.re = 0; int i,j; for (i = 0;i < row;i++) { if (fmod(colum,2)) { for (j = 0;j < (colum-1)/2;j++) { temp.re = (*(Matr + colum*i + (colum+1)/2+j)).re; temp.im = (*(Matr + colum*i + (colum+1)/2+j)).im; (*(Matr + colum*i + (colum+1)/2+j)).re = (*(Matr + colum*i + j)).re; (*(Matr + colum*i + (colum+1)/2+j)).im = (*(Matr + colum*i + j)).im; (*(Matr + colum*i + j)).re = temp.re; (*(Matr + colum*i + j)).im = temp.im; } for (j = (colum-1)/2;j temp.re = (*(Matr + colum*i + j)).re; temp.im = (*(Matr + colum*i + j)).im; (*(Matr + colum*i + j)).re = (*(Matr + colum*i + j + 1)).re; (*(Matr + colum*i + j)).im = (*(Matr + colum*i + j + 1)).im; (*(Matr + colum*i + j + 1)).re = temp.re; (*(Matr + colum*i + j + 1)).im = temp.im; } } else { for (j = 0;j < colum/2;j++) { temp.re = (*(Matr + colum*i + colum/2+j)).re; temp.im = (*(Matr + colum*i + colum/2+j)).im; (*(Matr + colum*i + colum/2+j)).re = (*(Matr + colum*i + j)).re; (*(Matr + colum*i + colum/2+j)).im = (*(Matr + colum*i + j)).im; (*(Matr + colum*i + j)).re = temp.re; (*(Matr + colum*i + j)).im = temp.im; } } } for (j = 0;j < colum;j++) { if (fmod(row,2)) { for (i = 0;i < (row-1)/2;i++) { temp.re = (*(Matr + colum*i + (row+1)*colum/2+j)).re; temp.im = (*(Matr + colum*i + (row+1)*colum/2+j)).im; (*(Matr + colum*i + (row+1)*colum/2+j)).re = (*(Matr + colum*i + j)).re; (*(Matr + colum*i + (row+1)*colum/2+j)).im = (*(Matr + colum*i + j)).im; (*(Matr + colum*i + j)).re = temp.re; (*(Matr + colum*i + j)).im = temp.im; } for (i = (row-1)/2;i temp.re = (*(Matr + colum*i + j)).re; temp.im = (*(Matr + colum*i + j)).im; (*(Matr + colum*i + j)).re = (*(Matr + colum*(i+1) + j)).re; (*(Matr + colum*i + j)).im = (*(Matr + colum*(i+1) + j)).im; (*(Matr + colum*(i+1) + j)).re = temp.re; (*(Matr + colum*(i+1) + j)).im = temp.im; } } else { for (i = 0;i < row/2;i++) { temp.re = (*(Matr + colum*i + row*colum/2+j)).re; temp.im = (*(Matr + colum*i + row*colum/2+j)).im; (*(Matr + colum*i + row*colum/2+j)).re = (*(Matr + colum*i + j)).re; (*(Matr + colum*i + row*colum/2+j)).im = (*(Matr + colum*i + j)).im; (*(Matr + colum*i + j)).re = temp.re; (*(Matr + colum*i + j)).im = temp.im; } } } } |
金蟲 (文壇精英)
老漢一枚
金蟲 (文壇精英)
老漢一枚
| 4 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 267一志愿南京工業(yè)大學(xué)0817化工求調(diào)劑 +10 | SUICHILD 2026-03-12 | 10/500 |
|
|---|---|---|---|---|
|
[考研] 0817調(diào)劑 +3 | 沒(méi)有答案_ 2026-03-14 | 3/150 |
|
|
[考研] 321求調(diào)劑 +3 | 何潤(rùn)采123 2026-03-18 | 3/150 |
|
|
[考研] 328求調(diào)劑,英語(yǔ)六級(jí)551,有科研經(jīng)歷 +3 | 生物工程調(diào)劑 2026-03-16 | 10/500 |
|
|
[考研] 295求調(diào)劑 +3 | 一志愿京區(qū)211 2026-03-18 | 5/250 |
|
|
[考研] 0703化學(xué)調(diào)劑 +4 | pupcoco 2026-03-17 | 7/350 |
|
|
[考研] 278求調(diào)劑 +5 | 煙火先于春 2026-03-17 | 5/250 |
|
|
[考研] 293求調(diào)劑 +11 | zjl的號(hào) 2026-03-16 | 16/800 |
|
|
[考博] 26博士申請(qǐng) +3 | 1042136743 2026-03-17 | 3/150 |
|
|
[基金申請(qǐng)] 被我言中:新模板不強(qiáng)調(diào)格式了,假專家開始管格式了 +4 | beefly 2026-03-14 | 4/200 |
|
|
[考研] 277調(diào)劑 +5 | 自由煎餅果子 2026-03-16 | 6/300 |
|
|
[碩博家園] 湖北工業(yè)大學(xué) 生命科學(xué)與健康學(xué)院-課題組招收2026級(jí)食品/生物方向碩士 +3 | 1喜春8 2026-03-17 | 5/250 |
|
|
[考研] [導(dǎo)師推薦]西南科技大學(xué)國(guó)防/材料導(dǎo)師推薦 +3 | 尖角小荷 2026-03-16 | 6/300 |
|
|
[考研] 0703 物理化學(xué)調(diào)劑 +3 | 我可以上岸的對(duì)?/a> 2026-03-13 | 5/250 |
|
|
[考研] 326求調(diào)劑 +3 | mlpqaz03 2026-03-15 | 3/150 |
|
|
[考研] 材料工程調(diào)劑 +9 | 咪咪空空 2026-03-12 | 9/450 |
|
|
[考研] 290求調(diào)劑 +7 | ADT 2026-03-12 | 7/350 |
|
|
[考研] 328化工專碩求調(diào)劑 +4 | 。,。,。,。i 2026-03-12 | 4/200 |
|
|
[考研] 289求調(diào)劑 +3 | 李政瑩 2026-03-12 | 3/150 |
|
|
[考研] 321求調(diào)劑(食品/專碩) +3 | xc321 2026-03-12 | 6/300 |
|