11 February 2022
11 February 2022
MQL5
double matrix::Flat(ulong index) const; // getter void matrix::Flat(ulong index,double value); // setter
Pseudocode for calculating the address of a matrix element:
ulong row=index / mat.Cols(); ulong col=index % mat.Cols(); mat[row,col]
For example, for 'matrix mat(3,3)', access to elements can be written as follows:
Tester
Terminal