PINE LIBRARY

MatrixScaleDown

Library "MatrixScaleDown"
Provides a function to scale down a matrix into a smaller square format were its values are averaged to mantain matrix topology.

method scale_down(mat, size)
  scale a matrix to a new smaller square size.
  Namespace types: matrix<float>
  Parameters:
    mat (matrix<float>): Source matrix.
    size (int): New matrix size.
  Returns: New matrix with scaled down size. Source values will be averaged together.
MATHmatrixresizescale

Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House rules.

Disclaimer