Files
mql5-skills/skills/mql5/references/docs/06-matrix/0292-matrix-matrix-initialization-matrix-fill.md
T
2026-06-23 21:47:51 +08:00

40 lines
568 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Fill
Fill an existing matrix or vector with the specified value.
```
void matrix::Fill(
  const double  value      // value to fill
   );
 
void vector::Fill(
  const double  value      // value to fill
   );
```
Parameters
value
[in]  Value to fill all the matrix elements.
Return Value
No return value. The matrix is filled in place with the specified value.
Example
```
   matrix matrix_a(2,2);
   matrix_a.Fill(10);
   Print("matrix_a\n",matrix_a);
 
/*
  matrix_a
  [[10,10]
   [10,10]]
*/
```