91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

剛剛整理出來的,武漢大學(xué)遙感院上機(jī)試題,復(fù)試機(jī)試可以用到。學(xué)會了這些機(jī)試應(yīng)該就沒問題了。用的是c語言。馬上復(fù)試了,大家加油!

資源截圖

代碼片段和文件信息

#include
#include

/*

resource?讀入數(shù)據(jù)指針
result???結(jié)果數(shù)據(jù)指針
rh???????讀入數(shù)據(jù)的行數(shù)
rw???????讀入數(shù)據(jù)的列數(shù)
temp?????模版數(shù)據(jù)指針
temph????模版數(shù)據(jù)的行數(shù)
tempw????模版數(shù)據(jù)的列數(shù)

void?cov(int?*resourceint?*resultint?rhint?rwint?*tempint?temphint?tempw)函數(shù)計(jì)算卷積結(jié)果無返回值。

*/

void?cov(int?*resourceint?*resultint?rhint?rwint?*tempint?temphint?tempw)
{

int?ijkl;

//計(jì)算數(shù)據(jù)過程中中,當(dāng)所剩下的行數(shù)和列數(shù)小于模版窗口的行數(shù)和列數(shù)時(shí)就停止計(jì)算。
for(i=0;(rh-i) {
for(j=0;(rw-j) {
int?res=0;

//進(jìn)行一次卷積計(jì)算所得到的的結(jié)果,初始值記為零。

for(k=0;k {
for(l=0;l {
res+=resource[(i+k)*rw+j+l]*temp[l*tempw+k];
//計(jì)算卷積結(jié)果
}
}
result[(i+1)*rw+j+1]=res;
//將計(jì)算結(jié)果賦給結(jié)果數(shù)組
}
}
}

void?main()
{
FILE?*data*result1*result2;
/*

data???????原始數(shù)據(jù)文件指針
result1????第一次計(jì)算結(jié)果保存的數(shù)據(jù)文件指針
result2????第二次計(jì)算結(jié)果保存的數(shù)據(jù)文件指針

*/

int?*resource*result;
//?讀入數(shù)據(jù)存放在resource所指的數(shù)組中
//?計(jì)算結(jié)果存放在result所指的數(shù)組中

resource=new?int[10000];
result=new?int[10000];
//?申請內(nèi)存空間

int?height1height2width1width2;
height1=125;
width1=80;
height2=100;
width2=100;
//?根據(jù)題目要求,設(shè)定數(shù)據(jù)的行數(shù)和列數(shù)

int?temp1[9]={0-10-15-10-10};
int?temp2[25]={00-1000-1-2-10-1-216-2-10-1-2-1000-100};
//?根據(jù)題目要求,設(shè)定模版

int?box;
//?每讀進(jìn)一個(gè)數(shù),暫時(shí)存于box中

data=fopen(“SourceData.txt““r“);
if(data==NULL)
{
printf(“can?not?open?this?file!\n“);
exit(0);
}
//檢驗(yàn)數(shù)據(jù)文件是否成功打開

result1=fopen(“result1.txt““w“);
result2=fopen(“result2.txt““w“);
//建立兩個(gè)結(jié)果文件

//將數(shù)據(jù)讀入resource中,并且將result初始化。
int?i;
for(i=0;i<10000;i++)
{
fscanf(data“%d“&box);
resource[i]=box;
result[i]=box;
}


//先將數(shù)據(jù)理解為125*80,模版1(temp1)進(jìn)行卷積運(yùn)算。
cov(resourceresultheight1width1temp133);


//將卷積運(yùn)算的結(jié)果存入result1文件中,并關(guān)閉result1指針。
for(i=0;i<10000;i++)
{
fprintf(result1“%6d“result[i]);

}
fclose(result1);

//將數(shù)據(jù)理解為100*100,用模版2(temp2)進(jìn)行卷積運(yùn)算。
cov(resourceresultheight2width2temp255);

//將運(yùn)算結(jié)果存入result2文件中,并關(guān)閉result2指針。
for(i=0;i<10000;i++)
{
fprintf(result2“%6d“result[i]);
}
fclose(result2);

//關(guān)閉data文件指針
fclose(data);

}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件?????????26??2009-03-16?13:18??2004年\test.txt

?????文件??????30208??2012-03-22?08:47??2004年\遙感院研究生復(fù)試04年上機(jī)試題.doc

?????文件?????????47??2012-03-22?09:20??2004年\result.txt

?????文件????????667??2012-03-22?08:48??2004年\test04\StdAfx.h

?????文件????????293??2012-03-22?08:48??2004年\test04\StdAfx.cpp

?????文件???????1208??2012-03-22?08:48??2004年\test04\ReadMe.txt

?????文件???????4536??2012-03-22?08:48??2004年\test04\test04.dsp

?????文件????????537??2012-03-22?08:48??2004年\test04\test04.dsw

?????文件????????909??2012-03-22?09:20??2004年\test04\test04.plg

?????文件??????33792??2012-03-22?09:21??2004年\test04\test04.ncb

?????文件???????1451??2012-03-22?09:19??2004年\test04\test04.cpp

?????文件??????53760??2012-03-22?09:21??2004年\test04\test04.opt

?????文件??????41984??2012-03-22?09:20??2004年\test04\Debug\vc60.idb

?????文件?????187120??2012-03-22?08:48??2004年\test04\Debug\test04.pch

?????文件??????53248??2012-03-22?09:20??2004年\test04\Debug\vc60.pdb

?????文件???????1807??2012-03-22?09:17??2004年\test04\Debug\StdAfx.obj

?????文件?????195820??2012-03-22?09:20??2004年\test04\Debug\test04.ilk

?????文件?????188475??2012-03-22?09:20??2004年\test04\Debug\test04.exe

?????文件?????476160??2012-03-22?09:20??2004年\test04\Debug\test04.pdb

?????文件???????5099??2012-03-22?09:20??2004年\test04\Debug\test04.obj

?????目錄??????????0??2012-04-15?22:36??2004年\test04\Debug

?????目錄??????????0??2012-04-15?22:36??2004年\test04

?????目錄??????????0??2012-04-15?22:36??2004年

-----------?---------??----------?-----??----

??????????????1277147????????????????????23


評論

共有 條評論