| 5 | 1/1 | 返回列表 |
| 查看: 896 | 回復(fù): 3 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | ||
[求助]
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; } } } } |
金蟲 (文壇精英)
老漢一枚
金蟲 (文壇精英)
老漢一枚
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿 南京航空航天大學(xué) ,080500材料科學(xué)與工程學(xué)碩 +5 | @taotao 2026-03-31 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 調(diào)劑申請 +7 | 張張張張zy 2026-03-31 | 7/350 |
|
|
[考研] 求調(diào)劑:085600材料與化工,考材科基,總分319 +16 | 678lucky 2026-03-31 | 20/1000 |
|
|
[考研] 張芳銘-中國農(nóng)業(yè)大學(xué)-環(huán)境工程專碩-298 +9 | 手機用戶 2026-03-26 | 9/450 |
|
|
[考研] 346求調(diào)劑 一志愿070303有機化學(xué) +11 | 蘿卜燉青菜 2026-03-28 | 12/600 |
|
|
[考研] 318求調(diào)劑 +10 | 陳晨79 2026-03-30 | 10/500 |
|
|
[考研] 266分,求材料相關(guān)專業(yè)調(diào)劑 +10 | 哇呼哼呼哼 2026-03-30 | 12/600 |
|
|
[考研] 南京大學(xué)化學(xué)調(diào)劑 +11 | 景隨風(fēng) 2026-03-29 | 16/800 |
|
|
[考研] 285求調(diào)劑 +6 | AZMK 2026-03-29 | 9/450 |
|
|
[考研] 334分 一志愿武理 材料求調(diào)劑 +16 | 李李不服輸 2026-03-26 | 16/800 |
|
|
[考研] 342求調(diào)劑 +4 | 加油a李zs 2026-03-26 | 4/200 |
|
|
[考研] 332求調(diào)劑 +6 | Lyy930824@ 2026-03-29 | 6/300 |
|
|
[考研] 337求調(diào)劑 +6 | 《樹》 2026-03-29 | 6/300 |
|
|
[考研] 求調(diào)劑 +4 | QiMing7 2026-03-25 | 5/250 |
|
|
[考研] 【求調(diào)劑】085601材料工程專碩 | 總分272 | +7 | 腳滑的守法公民 2026-03-27 | 7/350 |
|
|
[考研] 332求92調(diào)劑 +8 | 蕉蕉123 2026-03-28 | 8/400 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +8 | 邱gl 2026-03-27 | 8/400 |
|
|
[考研] 352分 化工與材料 +5 | 海納百川Ly 2026-03-27 | 5/250 |
|
|
[考研] 調(diào)劑 +3 | 李嘉圖·S·路 2026-03-27 | 3/150 |
|
|
[考研] 化學(xué)調(diào)劑一志愿上海交通大學(xué)336分-本科上海211 +4 | 小魚愛有機 2026-03-25 | 4/200 |
|