Matrix subtraction


How to do array subtraction in scidb 15.12 or do you have some security operators that do this?


In AFL the way to subtract two arrays A and B, assuming they have similar dimensions, will be something like

project(apply(join(A, B), x, A.val - B.val), x);

If the array dimensions are different or don’t overlap (so that the join() returns no cells), you might need to realign or reshape them using operators like subarray, redimension, or cross_join.

Unfortunately there isn’t a good short intro to building simple AFL queries, but there are longer video tutorials available here on the forum (search for “tutorial”). I’d recommend just looking over the reference guide to get a feel for what operators are available and what they do. The 16.9 doc is at . (I would recommend moving to 16.9 if you can, 15.12 does not get much attention these days.)

Mike Leibensperger


@rares has pulled together a nice collection of links to SciDB tutorials at . Thanks Rares!