锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品久久人人妻人人做精品,丰满少妇人妻久久久久久,国产99久久久国产精品小说http://www.shnenglu.com/matdu/category/7240.htmlmatduzh-cnSun, 21 Mar 2010 05:28:35 GMTSun, 21 Mar 2010 05:28:35 GMT60matlab鐢誨浘宸ュ叿http://www.shnenglu.com/matdu/articles/109917.html鏉滀紵鏉滀紵Wed, 17 Mar 2010 10:38:00 GMThttp://www.shnenglu.com/matdu/articles/109917.htmlhttp://www.shnenglu.com/matdu/comments/109917.htmlhttp://www.shnenglu.com/matdu/articles/109917.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/109917.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/109917.html甯哥敤鐢誨浘宸ュ叿錛宲lot錛宻ubplot,鐢誨鏁板潗鏍囩殑宸ュ叿錛歭oglog錛宻emilogx,semilogy


鏉滀紵 2010-03-17 18:38 鍙戣〃璇勮
]]>
C甯哥敤鏁板搴?/title><link>http://www.shnenglu.com/matdu/articles/69293.html</link><dc:creator>鏉滀紵</dc:creator><author>鏉滀紵</author><pubDate>Fri, 12 Dec 2008 13:39:00 GMT</pubDate><guid>http://www.shnenglu.com/matdu/articles/69293.html</guid><wfw:comment>http://www.shnenglu.com/matdu/comments/69293.html</wfw:comment><comments>http://www.shnenglu.com/matdu/articles/69293.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/matdu/comments/commentRss/69293.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/matdu/services/trackbacks/69293.html</trackback:ping><description><![CDATA[<p> #include <stdlib.h><br>  int abs( int num );<br>  double fabs( double arg );<br>  long labs( long num );<br>    鍑芥暟榪斿洖num鐨勭粷瀵瑰?/p> <p>  #include <math.h><br>  double acos( double arg );<br>    鍑芥暟榪斿洖arg鐨勫弽浣欏雞鍊鹼紝arg鐨勫煎簲璇ュ湪-1鍒?涔嬮棿</p> <p>  #include <math.h><br>  double asin( double arg );<br>    鍑芥暟榪斿洖arg鐨勫弽姝e雞鍊鹼紝arg鐨勫煎簲璇ュ湪-1鍒?涔嬮棿</p> <p>  #include <math.h><br>  double atan( double arg );<br>    鍑芥暟榪斿洖arg鐨勫弽姝e垏鍊?/p> <p>  #include <math.h><br>  double atan2( double y, double x );<br>    鍑芥暟榪斿洖y/x鐨勫弽姝e垏鍊鹼紝騫朵笖瀹冨彲浠ラ氳繃x錛寉鐨勭鍙峰垽鏂?br>    錛坸錛寉錛夋墍琛ㄧず鐨勮薄闄愶紝鍏惰繑鍥炵殑涔熸槸瀵瑰簲璞¢檺鐨勮搴﹀?/p> <p>  #include <math.h><br>  double ceil( double num );<br>  double floor( double arg );<br>    ceil鍑芥暟榪斿洖涓嶅皬浜巒um鐨勬渶灝忔暣鏁幫紝濡俷um = 6.04, 鍒欒繑鍥?.0<br>    floor鍑芥暟榪斿洖涓嶅ぇ浜巒um鐨勬渶澶х殑鏁幫紝濡俷um = 6.04, 鍒欒繑鍥?.0</p> <p>  #include <math.h><br>  double cos( double arg );<br>  double sin( double arg );<br>  double tan( double arg );<br>    鍑芥暟鍒嗗埆榪斿洖arg鐨勪綑寮︼紝姝e雞錛屾鍒囧鹼紝arg閮芥槸鐢ㄥ姬搴﹁〃紺?/p> <p>  #include <math.h><br>  double cosh( double arg );<br>  double sinh( double arg );<br>  double tanh( double arg );<br>    鍑芥暟鍒嗗埆榪斿洖arg鐨勫弻鏇蹭綑寮︼紝鍙屾洸姝e雞錛屽弻鏇叉鍒囷紝arg閮芥槸鐢ㄥ姬搴﹁〃紺虹殑</p> <p>  #include <math.h><br>  double fmod( double x, double y );<br>    鍑芥暟榪斿洖x/y鐨勪綑鏁?/p> <p>  #include <stdlib.h><br>  div_t div( int numerator, int denominator );<br>  ldiv_t ldiv( long numerator, long denominator );<br>    鍑芥暟榪斿洖numerator/demominator鎿嶄綔鐨勶紝榪斿洖涓涓粨鏋勪綋div_t(ldiv_t)<br>    div_t(ldiv_t)緇撴瀯浣撲腑瀹氫箟浜唓uot(鍟?,rem(浣欐暟)</p> <p>  #include <math.h><br>  double exp( double arg );<br>    鍑芥暟榪斿洖e(鑷劧搴曟暟)鐨刟rg嬈?/p> <p>  #include <math.h><br>  double log( double num );<br>    鍑芥暟榪斿洖num鐨勮嚜鐒跺鏁板糿um搴斾負澶т簬0鐨勬暟</p> <p>  #include <math.h><br>  double log10( double num );<br>    鍑芥暟榪斿洖num浠?0涓哄簳鐨勫鏁板鹼紝num涔熷簲璇ヤ負澶т簬0鐨勬暟</p> <p>  #include <math.h><br>  double pow( double base, double exp );<br>    鍑芥暟榪斿洖浠ase涓哄簳鐨別xp嬈★紝涓嶅厑璁哥殑鍙栧艱寖鍥?<br>    褰揵ase 涓?0 涓攅xp 灝忎簬鎴栫瓑浜?0<br>    褰揵ase 涓?璐熸暟 涓?exp 涓嶄負鏁存暟</p> <p>  #include <math.h><br>  double sqrt( double num );<br>    鍑芥暟榪斿洖num鐨勫紑鏂瑰鹼紝num搴旇涓轟笉灝忎簬0鐨勫?/p> <p>  #include <math.h><br>  double frexp( double num, int* exp );<br>    鍑芥暟鍙互鑾峰彇縐戝璁℃暟娉曠殑鍙傛暟<br>    鍑芥暟榪斿洖鍦?.5鍒?.0涔嬮棿鐨勫鹼紝 浼犲叆exp鐨勫弬鏁扮敤浜庤繑鍥瀗um鐨勬寚鏁?br>    (浠?涓哄簳鏁拌綆楋紝鍗籌細num = mantissa * (2 ^ exp))</p> <p>  #include <math.h><br>  double ldexp( double num, int exp );<br>    鍑芥暟榪斿洖num*(2^exp)鐨勫鹼紝濡傛灉緇撴灉婧㈠嚭錛岃繑鍥濰UGE_VAL </p> <p>  #include <math.h><br>  double modf( double num, double *i );<br>    鍑芥暟鍒嗗壊num錛屽皢鏁存暟閮ㄥ垎濉叆i鐨勫鹼紝灝忔暟閮ㄥ垎榪斿洖</p> <p>鏂囩珷鍑哄錛?a >http://www.diybl.com/course/3_program/c/c_js/2007925/73590.html</a></p> <img src ="http://www.shnenglu.com/matdu/aggbug/69293.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/matdu/" target="_blank">鏉滀紵</a> 2008-12-12 21:39 <a href="http://www.shnenglu.com/matdu/articles/69293.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓や釜璺濋樀鐩鎬箻http://www.shnenglu.com/matdu/articles/69292.html鏉滀紵鏉滀紵Fri, 12 Dec 2008 13:38:00 GMThttp://www.shnenglu.com/matdu/articles/69292.htmlhttp://www.shnenglu.com/matdu/comments/69292.htmlhttp://www.shnenglu.com/matdu/articles/69292.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/69292.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/69292.html#include<stdio.h>
#include<conio.h>
#define X 3
#define Y 3   //3*3鐨勮窛闃?/p>

int a[X][Y];
int b[X][Y];
int c[X][Y];

void matrix(int b[][X],int c[][Y]);
main()
{
int i,j,temp;
//clrsc();
printf("Please input int matrix b[%d][%d]\n",X,Y);
for(i=0;i<Y;i++)
for(j=0;j<Y;j++){
scanf("%d",&temp);
b[i][j]=temp;
}
printf("Please input int matrix c[%d][%d]\n",X,Y);
for(i=0;i<X;i++)
for(j=0;j<Y;j++){
scanf("%d",&temp);
c[i][j]=temp;
}
matrix(b,c);
printf("Now print resource matrix b[%d][%d]=",X,Y);
for(i=0;i<X;i++){
printf("\n");
for(j=0;j<Y;j++)
printf("%d ",b[i][j]);
}
printf("\n");
printf("Now print resource matrix c[%d][%d]=",X,Y);
for(i=0;i<X;i++){
printf("\n");
for(j=0;j<Y;j++)
printf("%d ",c[i][j]);
}
printf("\n");
printf("Now printm multiply results matrix a[%d][%d]=B*C:",X,Y);
for(i=0;i<X;i++){
printf("\n");
for(j=0;j<Y;j++)
printf("%d ",a[i][j]);
}
getch();
return 0;
}
/********************************************************************/
void matrix(int b[][X],int c[][Y])
{
int i,j,k,temp;
for(i=0;i<X;i++)
for(j=0;j<Y;j++){
for(k=0;k<Y;k++)
a[i][j]+=b[i][k]*c[k][j];
}
}

 



鏉滀紵 2008-12-12 21:38 鍙戣〃璇勮
]]>
甯哥敤Matlab璺濋樀榪愮畻鍑芥暟http://www.shnenglu.com/matdu/articles/63700.html鏉滀紵鏉滀紵Fri, 10 Oct 2008 14:09:00 GMThttp://www.shnenglu.com/matdu/articles/63700.htmlhttp://www.shnenglu.com/matdu/comments/63700.htmlhttp://www.shnenglu.com/matdu/articles/63700.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/63700.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/63700.html
eye 鍗曚綅鐭╅樀
zeros 鍏ㄩ浂鐭╅樀
ones 鍏?鐭╅樀
rand 鍧囧寑鍒嗗竷闅忔満闃?
genmarkov 鐢熸垚闅忔満Markov鐭╅樀
linspace 綰挎х瓑鍒嗗悜閲?
logspace 瀵規暟絳夊垎鍚戦噺
logm 鐭╅樀瀵規暟榪愮畻
cumprod 鐭╅樀鍏冪礌绱涔?
cumsum 鐭╅樀鍏冪礌绱鍜?
toeplitz Toeplitz鐭╅樀
disp 鏄劇ず鐭╅樀鍜屾枃瀛楀唴瀹?
length 紜畾鍚戦噺鐨勯暱搴?
size 紜畾鐭╅樀鐨勭淮鏁?
diag 鍒涘緩瀵硅鐭╅樀鎴栨娊鍙栧瑙掑悜閲?
find 鎵懼嚭闈為浂鍏冪礌1鐨勪笅鏍?
matrix 鐭╅樀鍙樼淮
rot90 鐭╅樀閫嗘椂閽堟棆杞?0搴?
sub2ind 鍏ㄤ笅鏍囪漿鎹負鍗曚笅鏍?
tril 鎶藉彇涓嬩笁瑙掗樀
triu 鎶藉彇涓婁笁瑙掗樀
conj 鍏辮江鐭╅樀
companion 浼撮殢鐭╅樀
det 琛屽垪寮忕殑鍊?
norm 鐭╅樀鎴栧悜閲忚寖鏁?
nnz 鐭╅樀涓潪闆跺厓绱犵殑涓暟
null 娓呯┖鍚戦噺鎴栫煩闃典腑鐨勬煇涓厓绱?
orth 姝d氦鍩?
rank 鐭╅樀縐?
trace 鐭╅樀榪?
cond 鐭╅樀鏉′歡鏁?
inv 鐭╅樀鐨勯?
rcond 閫嗙煩闃墊潯浠舵暟
lu LU鍒嗚В鎴栭珮鏂秷鍏冩硶
pinv 浼?
qr QR鍒嗚В
givens Givens鍙樻崲
linsolve 姹傝В綰挎ф柟紼?
lyap Lyapunov鏂圭▼
hess Hessenberg鐭╅樀
poly 鐗瑰緛澶氶」寮?
schur Schur鍒嗚В
expm 鐭╅樀鎸囨暟
expm1 鐭╅樀鎸囨暟鐨凱ade閫艱繎
expm2 鐢ㄦ嘲鍕掔駭鏁版眰鐭╅樀鎸囨暟
expm3 閫氳繃鐗瑰緛鍊煎拰鐗瑰緛鍚戦噺姹傜煩闃墊寚鏁?
funm 璁$畻涓鑸煩闃靛嚱鏁?
logm 鐭╅樀瀵規暟
sqrtm 鐭╅樀騫蟲柟鏍?

2 鐗規у間笌濂囧紓鍊?
spec 鐭╅樀鐗瑰緛鍊?
gspec 鐭╅樀鏉熺壒寰佸?
bdiag 鍧楃煩闃碉紝騫夸箟鐗瑰緛鍚戦噺
eigenmar- 姝e垯鍖朚arkov鐗瑰緛
kov 鍚戦噺
pbig 鐗瑰緛絀洪棿鎶曞獎
svd 濂囧紓鍊煎垎瑙?
sva 濂囧紓鍊煎垎瑙h繎浼?



3 鐭╅樀鍏冪礌榪愮畻

cumprod 鍏冪礌绱縐?
cumsum 鍏冪礌绱鍜?
hist 緇熻棰戞暟鐩存柟鍥?
max 鏈澶у?
min 鏈灝忓?
mean 騫沖潎鍊?
median 涓?
prod 鍏冪礌縐?
sort 鐢卞ぇ鍒板皬鎺掑簭
std 鏍囧噯宸?
sum 鍏冪礌鍜?
trapz 姊艦鏁板肩Н鍒?
corr 姹傜浉鍏崇郴鏁版垨鏂瑰樊



4紼鐤忕煩闃佃繍綆?

sparse 紼鐤忕煩闃?
adj2sp 閭繪帴鐭╅樀杞崲涓虹█鐤忕煩闃?
full 紼鐤忕煩闃佃漿鎹負鍏ㄧ煩闃?
mtlb_sparse 灝唖cilab紼鐤忕煩闃佃漿鎹負matlab紼鐤忕煩闃墊牸寮?
sp2adj 灝嗙█鐤忕煩闃佃漿鎹負閭繪帴鐭╅樀
speye 紼鐤忕煩闃墊柟寮忓崟浣嶇煩闃?
sprand 紼鐤忕煩闃墊柟寮忛殢鏈虹煩闃?
spzeros 紼鐤忕煩闃墊柟寮忓叏闆墮樀
lufact 紼鐤忕煩闃礚U鍒嗚В
lusolve 紼鐤忕煩闃墊柟紼嬫眰瑙?
spchol 紼鐤忕煩闃礐holesky鍒嗚В


鏉滀紵 2008-10-10 22:09 鍙戣〃璇勮
]]>
鍒╃敤Pi嫻嬭瘯cpu鐨勮綆楁晥鐜?/title><link>http://www.shnenglu.com/matdu/articles/62882.html</link><dc:creator>鏉滀紵</dc:creator><author>鏉滀紵</author><pubDate>Sat, 27 Sep 2008 03:34:00 GMT</pubDate><guid>http://www.shnenglu.com/matdu/articles/62882.html</guid><wfw:comment>http://www.shnenglu.com/matdu/comments/62882.html</wfw:comment><comments>http://www.shnenglu.com/matdu/articles/62882.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/matdu/comments/commentRss/62882.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/matdu/services/trackbacks/62882.html</trackback:ping><description><![CDATA[瀵逛簬涓鑸殑cpu錛屾垜浠拱鏉ヤ簡寰堥毦紜畾瀹冨氨鏄緢紼沖畾鍜屾甯稿伐浣滐紝浜庢槸瀵瑰叾嫻嬭瘯灝辨垚浜嗕竴涓緢閲嶈鐨勭幆鑺傘?br><br>鍦ㄦ暟瀛︿笂鎴戜滑鐭ラ亾鏈夎繖鏍蜂竴涓嚱鏁幫紝縐垎鍚庝負Pi錛屼絾鏄偅鏄В鏋愮殑銆傚浜庢暟瀛楀寲鐢佃剳錛岄毦鍏嶆湁鎴柇璇樊鍜岃垗鍏ヨ宸紝閭d箞褰撳彇鐐瑰緢澶氭椂錛岃宸細寰堝皬銆備簬鏄垜浠氨鍙互鍒╃敤榪欎釜鍘熺悊錛屽ぇ閲忕殑紱繪暎鏍肩偣錛岃揪鍒板嚑鍗冪敋鑷充笂涓囷紝閭d箞寰楀埌鐨凱i鍊間簬宸茬煡鐨勮繘琛屾瘮杈冿紝灝辯煡閬揷pu澶ф鐨勫伐浣滄晥鐜囥傚綋鐒惰繖鏍峰茍涓嶆槸寰堢簿紜紝浣嗗嵈鑳界粰鎴戜滑涓涓矖鐣ョ殑浼拌銆?br>涓嬮潰鏄垜鑷繁鍐欑殑涓涓皬鐨勭▼搴忥紝瀵筆i榪涜璁$畻錛屽緱鍒癙i鐨勫煎拰璁$畻鏃墮棿銆?br><br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">fstream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">ctime</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000"> std;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> f(</span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_107_457_Open_Image onclick="this.style.display='none'; Codehighlighter1_107_457_Open_Text.style.display='none'; Codehighlighter1_107_457_Closed_Image.style.display='inline'; Codehighlighter1_107_457_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_107_457_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_107_457_Closed_Text.style.display='none'; Codehighlighter1_107_457_Open_Image.style.display='inline'; Codehighlighter1_107_457_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_107_457_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_107_457_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    time_t Stime,Etime;</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> time class</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">10000000</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>  </span><span style="COLOR: #0000ff">long</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> h</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1.0</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">long</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000">)n;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">long</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> sum</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0.0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">long</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> x;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   time(</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">Stime);  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">time start</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">   </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000"> (i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">; i</span><span style="COLOR: #000000"><=</span><span style="COLOR: #000000">n; i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_310_343_Open_Image onclick="this.style.display='none'; Codehighlighter1_310_343_Open_Text.style.display='none'; Codehighlighter1_310_343_Closed_Image.style.display='inline'; Codehighlighter1_310_343_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_310_343_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_310_343_Closed_Text.style.display='none'; Codehighlighter1_310_343_Open_Image.style.display='inline'; Codehighlighter1_310_343_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </span><span id=Codehighlighter1_310_343_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_310_343_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    x</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">h</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">0.5</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    sum </span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000"> f(x);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>   }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>  </span><span style="COLOR: #0000ff">long</span><span style="COLOR: #000000">  </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> pi</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">h</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">sum;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">pi</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>  time(</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">Etime);  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">tim end</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #000000">   cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">Etime</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">Stime</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top></span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> f(</span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> a)<br><img id=Codehighlighter1_480_507_Open_Image onclick="this.style.display='none'; Codehighlighter1_480_507_Open_Text.style.display='none'; Codehighlighter1_480_507_Closed_Image.style.display='inline'; Codehighlighter1_480_507_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_480_507_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_480_507_Closed_Text.style.display='none'; Codehighlighter1_480_507_Open_Image.style.display='inline'; Codehighlighter1_480_507_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_480_507_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_480_507_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> (</span><span style="COLOR: #000000">4.0</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">(</span><span style="COLOR: #000000">1.0</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">a</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">a));<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <img src ="http://www.shnenglu.com/matdu/aggbug/62882.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/matdu/" target="_blank">鏉滀紵</a> 2008-09-27 11:34 <a href="http://www.shnenglu.com/matdu/articles/62882.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>甯稿井鍒嗘柟紼嬬殑鍥涢樁Runge-Kutta瑙f硶http://www.shnenglu.com/matdu/articles/61196.html鏉滀紵鏉滀紵Sun, 07 Sep 2008 03:12:00 GMThttp://www.shnenglu.com/matdu/articles/61196.htmlhttp://www.shnenglu.com/matdu/comments/61196.htmlhttp://www.shnenglu.com/matdu/articles/61196.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/61196.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/61196.html瀵逛簬甯稿井鍒嗘柟紼嬬殑鏁板艱В娉曪紝鍥涢樁Runge鈥擪utta鏄竴涓父鐢ㄧ殑鏂規硶錛屽叾綺懼害鐩稿杈冮珮錛屽疄鐜拌搗鏉ョ畝鍗曪紝鍥犺屾湁騫挎硾搴旂敤銆?br>涓嬮潰鎴戜滑綆瑕佽璁轟竴涓嬨?br>
璁句竴闃跺父寰垎鏂圭▼錛?
u'=f(t,u) a<t<b
u(t(0))=u(0)


Runge-Kutta闈炵嚎鎬ч珮闃跺崟姝ユ硶錛宲闃禦-K娉曠殑鏁翠綋闃舵璇樊涓篛(h^p)

R-K鍥涢樁綆楁硶涓猴細
u(i+1)=u(i)+h*(k1+3*k2+3*k3+k4)/8
k1=f(t(i),u(i))
k2=f(t(i+h/3),u(i+h*k1/3))
k3=f(t(i+h/3),u(i+h*k2/3))
k4=f(t(i+h),u(i+h*k3)) */



 

#include <iostream>
#include 
<cmath>
using namespace std;

class RK
{
  
private:
     
double k1,k2,k3,k4;
     
double h,b,u,a;
  
public:
     
void seth(double l=0){h=l;} //璁炬闀?/span>
     void setf(double xa=0,double xb=0,double y=0//璁懼垵鍊煎拰鑼冨洿錛坸a,xb錛?/span>
     {
      b
=xb;
      a
=xa;
      u
=y;
     }

    
double f(double t,double u) //鍑芥暟鍊鹼紝淇敼瀹冧互閫傚簲鍚勮嚜闇瑕?/span>
    {
  
//鍑芥暟璁懼畾
     double f=u-2*t/u; 
     
return f;
    }

    
/*---------------------------*/
    
void dork() //R-K 涓誨嚱鏁?/span>
    {
     
for(int count=0;count<(b-a)/h;count++)
     
{
      k1
=f(a+count*h,u);
      k2
=f(a+count*h+h/3,u+h*k1/3);
      k3
=f(a+count*h+2*h/3,u-h*k1/3+h*k2);
      k4
=f(a+count*h+h,u+h*k1-h*k2+h*k3);
      u
=u+h*(k1+3*k2+3*k3+k4)/8;
       cout
<<u<<endl;
     }


    }

}


void main()
{
RK my;
my.seth(
0.1);
my.setf(
0,1,1);
my.dork();
}

 
 

璇ョ▼搴忓鏁版嵁鐩存帴榪涜鏄劇ず錛屽瑕佺敾鍥撅紝鍙互鍔犲叆鍑犺錛岃緭鍑烘暟鎹紝鐒跺悗榪涜鐢誨浘銆?br>



鏉滀紵 2008-09-07 11:12 鍙戣〃璇勮
]]>
c/c++涓緱鏍囧噯搴?/title><link>http://www.shnenglu.com/matdu/articles/61191.html</link><dc:creator>鏉滀紵</dc:creator><author>鏉滀紵</author><pubDate>Sun, 07 Sep 2008 02:00:00 GMT</pubDate><guid>http://www.shnenglu.com/matdu/articles/61191.html</guid><wfw:comment>http://www.shnenglu.com/matdu/comments/61191.html</wfw:comment><comments>http://www.shnenglu.com/matdu/articles/61191.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/matdu/comments/commentRss/61191.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/matdu/services/trackbacks/61191.html</trackback:ping><description><![CDATA[榪欎簺鏄疌++鐨勫ご鏂囦歡錛?<br>#include <ctype.h>//瀛楃澶勭悊 <br><br>#include <errno.h>//瀹氫箟閿欒鐮?<br><br>#include <float.h>//嫻偣鏁板鐞?<br><br>#include <fstream.h>//鏂囦歡杈撳叆錛忚緭鍑?<br><br>#include <iomanip.h>//鍙傛暟鍖栬緭鍏ワ紡杈撳嚭 <br><br>#include <iostream.h> //鏁版嵁嫻佽緭鍏ワ紡杈撳嚭 <br><br>#include <limits.h> //瀹氫箟鍚勭鏁版嵁綾誨瀷鏈鍊煎父閲?<br><br>#include <locale.h> //瀹氫箟鏈湴鍖栧嚱鏁?<br><br>#include <math.h> //瀹氫箟鏁板鍑芥暟 <br><br>#include <stdio.h> //瀹氫箟杈撳叆錛忚緭鍑哄嚱鏁?<br><br>#include <stdlib.h> //瀹氫箟鏉傞」鍑芥暟鍙婂唴瀛樺垎閰嶅嚱鏁?<br><br>#include <string.h> //瀛楃涓插鐞?<br><br>#include <strstrea.h> //鍩轟簬鏁扮粍鐨勮緭鍏ワ紡杈撳嚭 <br><br>#include <time.h> //瀹氫箟鍏充簬鏃墮棿鐨勫嚱鏁?<br><br>#include <wchar.h> //瀹藉瓧絎﹀鐞嗗強杈撳叆錛忚緭鍑?<br><br>#include <wctype.h> //瀹藉瓧絎﹀垎綾?<br><br><br>鏍囧噯 C++ 錛堝悓涓婄殑涓嶅啀娉ㄩ噴錛?<br><br>#include <algorithm> //STL 閫氱敤綆楁硶 <br><br>#include <bitset> //STL 浣嶉泦瀹瑰櫒 <br><br>#include <cctype> <br><br>#include <cerrno> <br><br>#include <clocale> <br><br>#include <cmath> <br><br>#include <complex> //澶嶆暟綾?<br><br>#include <cstdio> <br><br>#include <cstdlib> <br><br>#include <cstring> <br><br>#include <ctime> <br><br>#include <deque> //STL 鍙岀闃熷垪瀹瑰櫒 <br><br>#include <exception> //寮傚父澶勭悊綾?<br><br>#include <fstream> <br>#include <functional> //STL 瀹氫箟榪愮畻鍑芥暟錛堜唬鏇胯繍綆楃錛?<br><br>#include <limits> <br><br>#include <list> //STL 綰挎у垪琛ㄥ鍣?<br><br>#include <map> //STL 鏄犲皠瀹瑰櫒 <br><br>#include <iomanip> <br><br>#include <ios> //鍩烘湰杈撳叆錛忚緭鍑烘敮鎸?<br><br>#include <iosfwd> //杈撳叆錛忚緭鍑虹郴緇熶嬌鐢ㄧ殑鍓嶇疆澹版槑 <br><br>#include <iostream> <br><br>#include <istream> //鍩烘湰杈撳叆嫻?<br><br>#include <ostream> //鍩烘湰杈撳嚭嫻?<br><br>#include <queue> //STL 闃熷垪瀹瑰櫒 <br><br>#include <set> //STL 闆嗗悎瀹瑰櫒 <br><br>#include <sstream> //鍩轟簬瀛楃涓茬殑嫻?<br><br>#include <stack> //STL 鍫嗘爤瀹瑰櫒 <br><br>#include <stdexcept> //鏍囧噯寮傚父綾?<br><br>#include <streambuf> //搴曞眰杈撳叆錛忚緭鍑烘敮鎸?<br><br>#include <string> //瀛楃涓茬被 <br><br>#include <utility> //STL 閫氱敤妯℃澘綾?<br><br>#include <vector> //STL 鍔ㄦ佹暟緇勫鍣?<br><br>#include <cwchar> <br><br>#include <cwctype> <br><br>using namespace std; <br><br><br>C99 澧炲姞 <br><br>#include //澶嶆暟澶勭悊 <br>#include //嫻偣鐜 <br>#include //鏁存暟鏍煎紡杞崲 <br>#include //甯冨皵鐜 <br>#include //鏁村瀷鐜 <br>#include //閫氱敤綾誨瀷鏁板瀹?/cn> <img src ="http://www.shnenglu.com/matdu/aggbug/61191.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/matdu/" target="_blank">鏉滀紵</a> 2008-09-07 10:00 <a href="http://www.shnenglu.com/matdu/articles/61191.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍐呰仈鍑芥暟(inline function) 鐨勪嬌鐢?/title><link>http://www.shnenglu.com/matdu/articles/58339.html</link><dc:creator>鏉滀紵</dc:creator><author>鏉滀紵</author><pubDate>Fri, 08 Aug 2008 06:18:00 GMT</pubDate><guid>http://www.shnenglu.com/matdu/articles/58339.html</guid><wfw:comment>http://www.shnenglu.com/matdu/comments/58339.html</wfw:comment><comments>http://www.shnenglu.com/matdu/articles/58339.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/matdu/comments/commentRss/58339.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/matdu/services/trackbacks/58339.html</trackback:ping><description><![CDATA[<p>鍐呰仈鍑芥暟inline 鏄竴涓皬鐨勪嬌鐢ㄦ妧宸э紝瀹冨湪緙栬瘧鏃朵細鍦ㄨ皟鐢ㄥ畠鐨勫湴鏂瑰睍寮錛岄氬父涓轟簡閬垮厤閲嶅璋冪敤鍑芥暟澧炲姞寮閿鑰屼嬌鐢ㄣ傚洜姝ゅ鏋滃嚭鐜版煇涓涓皬鐨勫嚱鏁扮粡甯歌皟鐢紝鍒欏彲浠ヨ冭檻鐢ㄥ唴鑱斿嚱鏁般?br><br>鍐呰仈鍑芥暟瀹氫箟鏃跺墠闈㈣鍔?inline錛屽茍涓斿畠鐨勫0鏄庡拰瀹氫箟瑕佹斁鍦ㄤ竴璧鳳紝濡傛灉浜岃呭垎寮錛屽垯澶卞幓鍐呰仈鐨勪綔鐢ㄣ傛墍鏈夌被鐨勫唴閮ㄥ嚱鏁伴兘鐩稿綋浜庡唴鑱斿嚱鏁般?br> <br>涓嬮潰鏄垜鍐欑殑涓涓皬鐨勫唴鑱斿嚱鏁幫細<br></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">cmath</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000"> std;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>inline </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> comp(</span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> x)<br><img id=Codehighlighter1_89_113_Open_Image onclick="this.style.display='none'; Codehighlighter1_89_113_Open_Text.style.display='none'; Codehighlighter1_89_113_Closed_Image.style.display='inline'; Codehighlighter1_89_113_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_89_113_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_89_113_Closed_Text.style.display='none'; Codehighlighter1_89_113_Open_Image.style.display='inline'; Codehighlighter1_89_113_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_89_113_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_89_113_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> exp(</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">x</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">x);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_127_201_Open_Image onclick="this.style.display='none'; Codehighlighter1_127_201_Open_Text.style.display='none'; Codehighlighter1_127_201_Closed_Image.style.display='inline'; Codehighlighter1_127_201_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_127_201_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_127_201_Closed_Text.style.display='none'; Codehighlighter1_127_201_Open_Image.style.display='inline'; Codehighlighter1_127_201_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_127_201_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_127_201_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">double</span><span style="COLOR: #000000"> X[</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        X[i]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">comp(</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">i</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">0.1</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> 鍑芥暟 comp鏄竴涓唴鑱斿嚱鏁般? <img src ="http://www.shnenglu.com/matdu/aggbug/58339.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/matdu/" target="_blank">鏉滀紵</a> 2008-08-08 14:18 <a href="http://www.shnenglu.com/matdu/articles/58339.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>linux 涓巟p涓嬬殑璁$畻鏃墮棿姣旇緝http://www.shnenglu.com/matdu/articles/57306.html鏉滀紵鏉滀紵Sun, 27 Jul 2008 10:46:00 GMThttp://www.shnenglu.com/matdu/articles/57306.htmlhttp://www.shnenglu.com/matdu/comments/57306.htmlhttp://www.shnenglu.com/matdu/articles/57306.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/57306.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/57306.html
鎴戠殑linux鏄疐C9錛岃繖鏄竴涓瘮杈冩柊鐨刲inux鐗堟湰錛屽xp鐨勭‖鐩樿兘鑷姩鎸傝澆銆傛垜鐢╩an 鍛戒護鍒嗗埆鏌ョ湅浜嗘湁g++緙栬瘧鍜宑++緙栬瘧錛屼篃灝辨槸璇村彲浠ラ『鍒╃紪璇慶++鏂囦歡銆?br>
鎴戝湪xp涓嬬敤鐨勬槸VC6緙栬瘧錛岃繖鏄井杞殑浜х墿錛屽浜庡啓搴旂敤杞歡寰堝ソ鐢紝浣嗗浜庢暟鍊艱綆楀氨涓鑸簡錛屼絾鎴戜篃涓嶅お娓呮鍝釜緙栬瘧鍣ㄥ鏁板兼湁濂界殑緙栬瘧錛屽氨涓鑸敤vc6浜嗐?br>
鎴戝啓浜嗕竴涓皬鐨勭▼搴忥紝灝辨槸鍦ㄩ噷闈㈡湁涓涓?0000000鐨勭畝鍗曞驚鐜凱鍔狅紝綾誨瀷鎴戝垎鍒敤浜唅nt鍜宒ouble鍨嬬殑榪涜瀹為獙銆傛垜鍙戠幇榪欎袱縐嶇被鍨嬶紝鍦╨inux涓嬭繘琛岃綆楁湁寰堥珮鐨勬晥鐜囥俵inux鍜寈p鐨勮綆楁椂闂村ぇ姒傛槸1錛?錛岃繖鍙笉鏄竴涓皬鏁板晩錛岀湅鏉ヨ繕鏄痩inux鐨勮綆楁晥鐜囬珮錛佷絾鏄垜浠呬粎鏄繘琛屼簡涓涓猣or寰幆錛屾病鏈夌敤鍏朵粬鐨勫鏉傜殑紼嬪簭錛屽彲鑳藉湪搴旂敤杞歡鏂歸潰浜岃呭氨鏄樊涓嶅浜嗭紵錛?

鏉滀紵 2008-07-27 18:46 鍙戣〃璇勮
]]>
c/c++ 涓殑璁℃椂錛坱ime綾伙級http://www.shnenglu.com/matdu/articles/57286.html鏉滀紵鏉滀紵Sun, 27 Jul 2008 01:34:00 GMThttp://www.shnenglu.com/matdu/articles/57286.htmlhttp://www.shnenglu.com/matdu/comments/57286.htmlhttp://www.shnenglu.com/matdu/articles/57286.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/57286.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/57286.html鍦ㄨ綆楁椂錛屾湁鏃跺欐垜浠姹傜煡閬撴暣涓嚱鏁扮殑璁$畻鏃墮棿錛岄偅涔坈++鐨則ime綾誨氨媧句笂鐢ㄥ浜嗐?br>
time綾誨寘鍚湪 澶存枃浠?ctime 涓紝涓涓畝鍗曠殑浣跨敤濡備笅錛?br>
time_t Stime,Etime;       //Stime鏄紑濮嬬殑鏃墮棿錛孍time鏄粨鏉熺殑鏃墮棿
time(&Stime)錛?nbsp;          //寮濮嬭鏃?br>……
……  //紼嬪簭涓婚
time錛?amp;Etime錛夛紱   //緇撴潫璁℃椂
cout<<Etime-Stime<<endl;


鎴戝湪vc涓『鍒╅氳繃榪欑鐢ㄦ硶鐨勭紪璇戯紝鍏剁粨鏋滄槸紼嬪簭榪愯鐨勬椂闂寸鏁般傝繖姝eソ寰楀埌鎴戞兂瑕佺殑緇撴灉錛?br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
鍦–涓殑鏃墮棿鍑芥暟鐨勭敤娉?br>鏃墮棿鍑芥暟鍖呭惈鍦ㄥご鏂囦歡 time.h涓?br>












鏉滀紵 2008-07-27 09:34 鍙戣〃璇勮
]]>
const 涓巇efine鐨勫尯鍒拰浼樺姡http://www.shnenglu.com/matdu/articles/51432.html鏉滀紵鏉滀紵Wed, 28 May 2008 14:16:00 GMThttp://www.shnenglu.com/matdu/articles/51432.htmlhttp://www.shnenglu.com/matdu/comments/51432.htmlhttp://www.shnenglu.com/matdu/articles/51432.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/51432.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/51432.html
鑰宒efine浠呬粎鏄竴涓浛浠o紝娌℃湁浠諱綍媯鏌ャ?br> 

鍥犳錛屽緩璁湪闇瑕佸父閲忕殑鍦版柟灝介噺鐢╟onst鏉ュ畾涔夛紒

鏉滀紵 2008-05-28 22:16 鍙戣〃璇勮
]]>
c++涓璭ndl涓庘淺n鈥濈殑鍖哄埆http://www.shnenglu.com/matdu/articles/51334.html鏉滀紵鏉滀紵Tue, 27 May 2008 15:08:00 GMThttp://www.shnenglu.com/matdu/articles/51334.htmlhttp://www.shnenglu.com/matdu/comments/51334.htmlhttp://www.shnenglu.com/matdu/articles/51334.html#Feedback0http://www.shnenglu.com/matdu/comments/commentRss/51334.htmlhttp://www.shnenglu.com/matdu/services/trackbacks/51334.html

浣嗕竴鑸儏鍐碉紝浜岃呯殑榪欑偣鍖哄埆鏄緢灝忕殑錛屽湪澶х殑紼嬪簭涓彲鑳戒細鐢ㄥ埌銆傚緩璁敤endl鏉ユ崲琛屻?

鏉滀紵 2008-05-27 23:08 鍙戣〃璇勮
]]>
久久久久18| 久久国产亚洲精品麻豆| 国内精品伊人久久久影院| 久久精品无码一区二区WWW| 一本一本久久A久久综合精品| 国产午夜精品久久久久免费视| 日本精品久久久久中文字幕| 亚洲国产成人久久笫一页| 欧洲精品久久久av无码电影| 亚洲一区中文字幕久久| 一本色道久久综合狠狠躁| yellow中文字幕久久网| 一本色道久久综合狠狠躁| 国产国产成人久久精品| 久久国产精品99精品国产| 亚洲午夜无码AV毛片久久| 久久99精品国产| 日本人妻丰满熟妇久久久久久| 热久久国产欧美一区二区精品 | 久久九九有精品国产23百花影院| 久久久久99精品成人片| 久久久91精品国产一区二区三区 | 久久久久国产精品三级网| 久久久久AV综合网成人| 久久国产色av免费看| 欧美与黑人午夜性猛交久久久 | 91精品国产91热久久久久福利 | 久久综合久久综合久久综合| 亚洲精品乱码久久久久久自慰| 久久成人精品| 99热都是精品久久久久久| 97久久精品无码一区二区天美| 亚洲国产精品无码久久久秋霞2| 波多野结衣久久| 久久精品青青草原伊人| 国产精品成人久久久| 久久天天躁夜夜躁狠狠| 久久天天躁狠狠躁夜夜avapp| 漂亮人妻被中出中文字幕久久| 久久精品国产日本波多野结衣 | 国产精品久久久久久久久久影院 |