octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiply matrix slices


From: Parsiad Azimzadeh
Subject: Multiply matrix slices
Date: Sun, 22 Nov 2015 07:05:25 +0000

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]