130 | | vec ll (Merger->_Smp()._samples().length()); |
131 | | for (int j = 0; j < Merger->_Smp()._samples().length(); j++) { |
132 | | ll (j) = Merger->evallog (Merger->_Smp()._samples() (j)); |
| 130 | merger_mix* MerMix=dynamic_cast<merger_mix*>(Merger); |
| 131 | vec mix_val; |
| 132 | |
| 133 | if (MerMix){ |
| 134 | vec ll (Merger->_Smp()._samples().length()); |
| 135 | for (int j = 0; j < Merger->_Smp()._samples().length(); j++) { |
| 136 | ll (j) = Merger->evallog (Merger->_Smp()._samples() (j)); |
| 137 | } |
| 138 | |
| 139 | vec sll = exp (ll); |
| 140 | |
| 141 | mix_val = sll / sum (sll); |
160 | | mxArray* fldm = mxCreateDoubleMatrix (1, w.length(), mxREAL); |
161 | | vec2mxArray (mix_val, fldm); |
162 | | mxReplaceFieldNM (tmp, "mix", fldm); |
163 | | |
| 164 | if (mix_val.length()>0){ |
| 165 | mxArray* fldm = mxCreateDoubleMatrix (1, w.length(), mxREAL); |
| 166 | vec2mxArray (mix_val, fldm); |
| 167 | mxReplaceFieldNM (tmp, "mix", fldm); |
| 168 | } |