What does this command do?
Afficher commentaires plus anciens
I have this code I'm trying to decipher but there are some commands I have no idea how to even start looking for the answer of what they do. I understand the first command is just a cumulative sum of the vector s_jt, but the next two I don't get what they're doing. cdindex is a vector of indices. I greatly appreciate any help.
temp = cumsum(s_jt);
sum1 = temp(cdindex,:);
sum1(2:size(sum1,1),:) = diff(sum1);
3 commentaires
Walter Roberson
le 1 Nov 2018
Are the values in cdindex consecutive?
Sebastian Pinzon
le 1 Nov 2018
Walter Roberson
le 2 Nov 2018
So the point of the code is to produce a subtotal of sales per brand?
Réponses (0)
Catégories
En savoir plus sur Big Data Processing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!