pivottable (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

• Last update: 5 years ago
• Price: Free |
• Operating system: Linux, Mac OS X, Win All, BSD, Solaris
• Publisher: Zhiqiang Zhang (7 other programs)
See full specifications

pivottable (Scripts) Publisher's description

out = pivottable(inMatrix, pivotRow, pivotColumn, valueColumn, valueFun) groupthe input matrix "inMatrix" into a pivottable similar with Excel.

out = pivottable(inMatrix, pivotRow, pivotColumn, valueColumn, valueFun) group
the input matrix "inMatrix" into a pivottable similar with Excel. Anyone
who are familiar with the pivottable in Excel will not have difficulties
with this function.

How the pivottables created are shown in following examples:
let
inMatrix = {
'2009', 'Mon', 12, 31;
'2009', 'Wed', 11, 34;
'2009', 'Fri', 1, 4;
'2009', 'Mon', 3, 4;
'2009', 'Wed', 9, 6;
'2009', 'Fri', 1, 4;
'2010', 'Mon', 18, 15;
'2010', 'Wed', 11, 21;
'2010', 'Wed', 1, 4;
};
then
pivottable(inMatrix, 1, 2, 3, @sum) output a cell
[] 'Fri' 'Mon' 'Wed'
'2009' [ 2] [ 15] [ 20]
'2010' [] [ 18] [ 12]
pivottable(inMatrix, [1 2], [], 3, @sum) output a cell
'2009' 'Fri' [ 2]
'2009' 'Mon' [15]
'2009' 'Wed' [20]
'2010' 'Mon' [18]
'2010' 'Wed' [12]
pivottable(inMatrix, [], 2, 3, @sum) output a cell
'Fri' 'Mon' 'Wed'
[ 2] [ 33] [ 32]
pivottable(inMatrix, 1, 2, [3 4], {@sum, @(x)(numel(x))})
[] 'Fri' 'Fri' 'Mon' 'Mon' 'Wed' 'Wed'
'2009' [ 2] [ 2] [ 15] [ 2] [ 20] [ 2]
'2010' [] [] [ 18] [ 1] [ 12] [ 2]

System Requirements:

MATLAB 7.11 (2010b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

pivottable (Scripts) Tags:

Click on a tag to find related softwares

Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation