|Subject:||Re: Creating double hypermatrix in C++|
|Date:||Wed, 19 Oct 2016 11:25:44 +0530|
Il 19 ott 2016 7:19 AM, "Shamika Mohanan" <address@hidden> ha scritto:
> It works if the dimensions are specified. I had to change a to 0 based indexing. What does 4 refer to in dim_vector d(4, iRows, iCols);? Number of matrices?
It's the range of variation of the first index, you had
for (a = 1; a ≤ 3; a++)
Which means "a" can take the maximum value of 3, as the minimum value is always 0, that means "a" can take 4 different values.
In Octave sources the indices of a 3dimensional matrix are some times referred to as
1st index = row index
2nd index = column index
3rd index = page index
In this notation your matrix had 4 rows, "iRows" columns and "iCols" pages and "a" is the "row index".
|[Prev in Thread]||Current Thread||[Next in Thread]|