1

I want to calculate the moving average for each column of a matrix in DolphinDB. But I encountered an error when using higher order function moving(avg, m, w), which is shown in the following figure.

enter image description here

However, the function mavg(m, w) works fine with the same input. Can someone shed light on the cause of the issue? Thanks in advance!

Eva Gao
  • 402
  • 1
  • 7

1 Answers1

1

Currently, the moving function in DolphinDB only supports vectors, dictionaries and tables as the input.

For your question, try the following two methods:

  • mavg(m, w)
  • each(moving{avg,,w}, m): the higher-order function each is used to apply moving{avg,,w} to each column of the matrix "m".
molddd123
  • 297
  • 6