資源簡介
實(shí)現(xiàn)大地測量課程中,兩個(gè)平面坐標(biāo)之間的相互轉(zhuǎn)換的c程序
代碼片段和文件信息
#include?
#include?
#define?PI?3.1415926
typedef?struct?Data
{
double?x;
double?y;
}?d1[4]d2[4];
void?ReadDat(Data?d1[4]Data?d2[4])
{
FILE?*fp1*fp2;
fp1=fopen(“old.txt““r“);
fp2=fopen(“new.txt““r“);
double?txtypxpy;
int?cnt1=0cnt2=0;
do
{
fscanf(fp1“%lf%lf“&tx&ty);
d1[cnt1].x=tx;
d1[cnt1].y=ty;
cnt1++;
}while(cnt1<4);
do
{
fscanf(fp2“%lf%lf“&px&py);
d2[cnt2].x=px;
d2[cnt2].y=py;
cnt2++;
}while(cnt2<4);
fclose(fp1);
fclose(fp2);
}
//矩陣轉(zhuǎn)置
template
void?Transpose(T1?*mat1T2?*mat2int?aint?b)
{??
int?ij;
for(i=0;i for(j=0;j mat2[j][i]=mat1[i][j];
return;
}
//矩陣相乘
template
void?Multiply(T1?*mat1T2?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
????.CA....?????41984??2011-11-21?00:04??平面坐標(biāo)轉(zhuǎn)換\Debug\vc60.idb
????.CA....?????53248??2011-11-21?00:01??平面坐標(biāo)轉(zhuǎn)換\Debug\vc60.pdb
????.CA....????188526??2011-11-21?00:01??平面坐標(biāo)轉(zhuǎn)換\Debug\坐標(biāo)轉(zhuǎn)換.exe
????.CA....????199136??2011-11-21?00:01??平面坐標(biāo)轉(zhuǎn)換\Debug\坐標(biāo)轉(zhuǎn)換.ilk
????.CA....?????11756??2011-11-21?00:04??平面坐標(biāo)轉(zhuǎn)換\Debug\坐標(biāo)轉(zhuǎn)換.obj
????.CA....????221452??2011-11-21?00:01??平面坐標(biāo)轉(zhuǎn)換\Debug\坐標(biāo)轉(zhuǎn)換.pch
????.CA....????484352??2011-11-21?00:01??平面坐標(biāo)轉(zhuǎn)換\Debug\坐標(biāo)轉(zhuǎn)換.pdb
????.CA....???????126??2011-11-20?19:11??平面坐標(biāo)轉(zhuǎn)換\new.txt
????.CA....???????134??2011-11-20?19:11??平面坐標(biāo)轉(zhuǎn)換\old.txt
????.CA....??????2805??2011-11-21?00:01??平面坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.cpp
????.CA....??????3427??2011-11-20?19:11??平面坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.dsp
????.CA....???????524??2011-11-20?19:11??平面坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.dsw
????.CA....?????50176??2011-11-24?15:59??平面坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.ncb
????.CA....?????48640??2011-11-24?15:59??平面坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.opt
????.CA....???????757??2011-11-21?00:04??平面坐標(biāo)轉(zhuǎn)換\坐標(biāo)轉(zhuǎn)換.plg
?????目錄??????????0??2011-11-21?00:09??平面坐標(biāo)轉(zhuǎn)換\Debug
?????目錄??????????0??2011-11-24?15:59??平面坐標(biāo)轉(zhuǎn)換
-----------?---------??----------?-----??----
??????????????1307043????????????????????17
評(píng)論
共有 條評(píng)論