• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión723a98687c3e1128cc9e752bcee7f36bbf504072 (tree)
Tiempo2007-08-05 22:42:44
Autoriselllo
Commiteriselllo

Log Message

Now the code 3D_R_plotting.R calculates the distance (in a least-square
sense) between the fitting of the final state and the numerical result.

Cambiar Resumen

Diferencia incremental

diff -r 63cacdc9dd95 -r 723a98687c3e R-codes/3D_R_plotting.R
--- a/R-codes/3D_R_plotting.R Sun Aug 05 13:38:44 2007 +0000
+++ b/R-codes/3D_R_plotting.R Sun Aug 05 13:42:44 2007 +0000
@@ -1,8 +1,8 @@
11 rm(list=ls())
22 library(lattice)
33
4-time_end<-50 #----end of time for the 3D plot
5-number_distr<-50 #---similar to above, but for the 2D plot.
4+time_end<-45 #----end of time for the 3D plot
5+number_distr<-46 #---similar to above, but for the 2D plot.
66
77 D_seq<-read.table("diameter_sequence",header=FALSE)
88 D_seq<-as.matrix(D_seq)
@@ -169,11 +169,24 @@
169169 lines(D_mean,data_150[number_distr, ],lwd=2,col="brown")
170170
171171 legend("topright",cex=1.2, c(expression("Initial"), expression("Experiment"),expression("Simulation")),
172-lwd=c(2,2,2),lty=c(2,1,1),pch = c(-1,4,-1),col=c("black","blue", "brown"),box.lwd=0,box.lty=0
172+lwd=c(2,2,2),lty=c(2,1,1),pch = c(-1,4,-1),col=c("black","blue", "brown"),box.lwd=0,box.lty=1
173173 ,xjust = 1, yjust = 1)
174174
175175 dev.off()
176176
177+#Finally I estimate an error(sum of squares involving the numerical solution and the fitting of the final state):
178+final_fit<-read.table("dn_dlog_fin", header=FALSE)
179+final_fit<-as.matrix(final_fit) #to have the fitted population in cm^-3
180+
181+my_error<-sum((final_fit-data_150[number_distr, ])^2)
182+my_error<-sqrt(my_error)
183+print('the difference (square root of sum of the squares) between the final numerical result and the fitting of the final state is')
184+print(my_error)
185+write.table(my_error,"lsq_error",col.names=FALSE,row.names=FALSE)
186+print("and the relative error is")
187+rel_error<-my_error/sum(final_fit)
188+print(rel_error)
189+write.table(rel_error,"relative_error",col.names=FALSE,row.names=FALSE)
177190
178191
179192 # 'merge = TRUE' for merging lines & points: