Pivot/unPivot
These two functions are meant to format a flat dataset into a pivot table and to unpivot it back.
They imitate the T_SQL pivot/unpivot commands or the pivoting functionalities of the spreadsheet softwares.
If you a have a large set of values which are described by two features (or more) this function allows you to group those values by those two features.
For example, you can sum to the total amount sold over the last 10 months by any of your employees or you can count the number of contracts signed by region and by salesmen and so on...
For detailed help and description see the published M-file or the help of the functions.
For examples see the attached snapshot.
Comments/suggestions/error reports are welcome.
Thanks to Jos (10584) for cell2float.
p4v3
Cita come
Oleg Komarov (2024). Pivot/unPivot (https://www.mathworks.com/matlabcentral/fileexchange/26119-pivot-unpivot), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Language Fundamentals > Data Types > Tables >
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.