Hello,
My only concern in applying such a procedure in Fluka is the following: let’s call d(i) the biological dose at the i-th step. Now, you can have fluctuation in this quantity, which eventually will average to the biological dose:
D = average( d(i) )
With FLUKA (particularly comscw.f), you can easily apply any weight during the simulation as you have correctly done. However, since you require the formula to be applied to the results (since you are satisfied with the Matlab results), the outcoming would be radically different.
Consider this example for instance.
Postprocessing: Effect = function( average( d(i) ) )
On the fly: Effect = average( function ( d(i) ) )
Unless the function is linear (i.e. a normalization factor), the two calculation will yield to different results.
Therefore, in the end, if you want to apply an empirical equation to the FLUKA output, and you want to do in in the fluka environment, you would need to do it in usbsuw.f.
As a side note, considering the work you are doing, I suggest you to read also the RAD-BIOL and TPPSCORE card documentation and the corresponding questions in the forum (i.e. About RAD-BIOL and TPSSCORE card, Question about results of RAD-BIOL and TPSSCORE card(s), Calculate with Biological model)
Hope it helped!
Cheers,
Daniele