#### new 2.3

Michi authored on 11/06/2012 09:55:58
Showing 1 changed files
 ... ... @@ -83,6 +83,13 @@ dim_m = length(m_vec) 83 83 dim_a = length(a_vec) 84 84 dim_b = length(b_vec) 85 85 86 +err_qua_m = 0 87 +err_qua_a = 0 88 +err_qua_b = 0 89 +err_lin_b = 0 90 +err_lin_m = 0 91 +err_con_b = 0 92 + 86 93 #Marginalization of posterior_quad over a 87 94 int_qua_a=array(0, c(dim_m, dim_b)) 88 95 for (i in (1:dim_m)){ ... ... @@ -128,3 +135,16 @@ for (i in (1:length(b_vec))){ 128 135 int_lin_m=array(0, dim=c(dim_b)) 129 136 I=int(b_vec, norm(posterior_con)) 130 137 int_con_b=I 138 + 139 + 140 + 141 +# The integration via fit is computationally expensive compared to the simple numerical integration 142 + 143 + 144 +strqua = paste("quadratic: ax^2 + mx +b with a=",toString(best_a_qua),"+-",toString(err_qua_a),",\n m=", toString(best_m_qua),"+-",toString(err_qua_m),", b=",toString(best_b_qua),"+-",toString(err_qua_b)) 145 +strlin = paste("linear: mx +b with m=", toString(best_m_lin),"+-",toString(err_lin_m),",\n b=",toString(best_b_lin),"+-",toString(err_lin_b)) 146 +strcon = paste("constant: b with b=",toString(best_b_con),"+-",toString(err_con_b)) 147 +print(strqua) 148 +text(0,2.8,strqua) 149 +text(0,2.1,strlin) 150 +text(0,1.6,strcon)