matlab,cell-array,n-dimensional

This is also a mess, but works. It goes the ND-array way. X = [1 1 1 0.64 1 2 1 0.86 1 1 1 0.74 1 1 2 0.56]; %// data N = size(X,1); %// number of values [~, ~, label] = unique(X(:,1:end-1),'rows'); %// unique labels for indices cumLabel...

arrays,matlab,matrix,n-dimensional

It looks like you are looking for something like this zscale = 5; depth = 5; B = A(:,:,depth/zscale); ...

c++,arrays,if-statement,multiplication,n-dimensional

I don't know the function of C, but i presume it would work like this (thought process / logic only, not actual code) nums = array(1, 2, 3, 4, 5) output space for left display column of numbers foreach (nums as header) { // this hopefully builds the top of...

arrays,scala,multidimensional-array,n-dimensional

If you really want arbitrary numbers of dimensions, you typically use a single flat array with a second array that indexes by dimension to get to the element you want. So, for instance, class MultiArray(dims: Array[Int]) { private val array = new Array[Double](dims.product) private def arrayIndex(index: Array[Int]) = { var...