cancel
Showing results for 
Search instead for 
Did you mean: 

null first n terms for mavg

powerpeanuts
New Contributor III

Hello, how can i set null for first n terms in mavg? For example,

a: til 10

3 mavg a gets:

0 0.5 1 2 3.....

 

How can I set null for the first 2 terms?

i.e. I want to get:

0n 0n 1 2 3.....

 

1 ACCEPTED SOLUTION

BaiChen
New Contributor III

To set value in a list, we can use @

n:2
@[3 mavg a;til n;:;0n]
0n 0n 1 2 3 4 5 6 7 8
q)

View solution in original post

1 REPLY 1

BaiChen
New Contributor III

To set value in a list, we can use @

n:2
@[3 mavg a;til n;:;0n]
0n 0n 1 2 3 4 5 6 7 8
q)