Currently I\'m trying to find a compact way to average a matrix. The obvious solution is to sum the matrix, then divide by the number of elements. I have, h
No, you can't do like this. The object Transaction
is a Modal Class
. This class
is having three properties, namely
Each row
in this image represents one Transaction modal object
.
transactions
is an array
which is holding all these rows (Transaction Modal Objects
).
In these transactions
array, they are trying to calculate the Transaction Modal
amount field average using the operator @avg
. So, its like
NSNumber *transactionAverage = [transactions valueForKeyPath:@"@avg.amount"];
your array doesn't have the key self
. So that's the problem