A triply-nested loop in an octave-financial routine I wrote renders it fairly slow:
http://sourceforge.net/p/octave/financial/ci/default/tree/inst/@sde/simByEuler.m.
This could be fixed through a _native_ routine to multiply slices. That is, if A and B are 3-dimensional real arrays, C = multiply_slices(A,B) would give:
C(:, :, 1) == A(:, :, 1)*B(:, :, 1),
...,
C(:, :, k) == A(:, :, k)*B(:, :, k).
I am guessing no such routine exists in the core. I may also be overlooking other possible solutions. Has anyone run into a similar problem/have advice?
Thanks,
Parsiad