Die statische Funktion erstellt und retourniert eine neue Matrix, die mit Nullen gefüllt wurde.
static matrix matrix::Zeros( const ulong rows, // Zeilenanzahl const ulong cols // Spaltenanzahl ); static vector vector::Zeros( const ulong size, // Vektorgröße );
Parameter
rows
[in] Zeilenanzahl.
cols
[in] Spaltenanzahl.
Rückgabewert
Eine neue Matrix mit angegebenen Zeilen- und Spaltenanzahl, die mit Nullen gefüllt ist.
MQL5 Beispiel:
matrix zeros=matrix::Zeros(3, 4); Print("zeros = \n", zeros); /* zeros = [[0,0,0,0] [0,0,0,0] [0,0,0,0]] */
Python Beispiel:
np.zeros((2, 1)) array([[ 0.], [ 0.]])