Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Help with if condition
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
he thing is i have a matrix where the first column is the code of the item sold and the second column is the week where that item were sold. Im trying to know the frecuency of sales of each item im working with (meaning this if the item has been sold every week or just in a few weeks).
This is my matrix
Item week
0012 1
0013 1
0012 2
0012 2
0012 2
0013 2
0013 3
n 53
So i want to know how to make a code that give me as a result this
Item week1 week2 week3 week4 week5
0012 1 1 0 0 1
0013 0 0 1 0 0
n 1 0 1 1 0
Meaning this the item 0012 were sold on week1 week2 week5 no sales for week3 and week4.
And it would be so much better if possible if the code result is this:
Item week1 week2 week3 week4 week5
0012 1 2 0 0 3
0013 0 0 1 2 0
n 1 0 3 2 0
Meaning this the item 0012 were sold once on week1 twice on week2 and 3 times on week 5.
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!