Info

This question is closed. Reopen it to edit or answer.

How can I set non-consecutive 'val' for 'accumarray'?

2 views (last 30 days)
jee young yoo
jee young yoo on 16 Aug 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello,
simple question.
Is it available to set val from 'accumarray(x,val)' which is non-consecutive?
For example,
x = size of (1500, 1 ) double , // interestrates actually,
y = size of (1500, 1 ) timestamp,
I'd like to compress y with yyyyMMWW, and x with average of matched column.
but it seems 'val' is not possbile to use with non-consecutive.
B.RGDS/Jeremy
  3 Comments
madhan ravi
madhan ravi on 16 Aug 2019
Also illustrate your need with an example.
Walter Roberson
Walter Roberson on 16 Aug 2019
You should have a look at findgroups() and possibly groupstats()

Answers (0)

This question is closed.

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!