|
| 1 | +PARTITION_X Creates sub-partitions of response matrix for quadratic |
| 2 | + extrapolation bias correction. |
| 3 | + |
| 4 | + ------ |
| 5 | + SYNTAX |
| 6 | + ------ |
| 7 | + PARTITION_X can be used in two different ways |
| 8 | + |
| 9 | + Xpart = partition_X(X, nt, Npart, partIdx, ntPart); |
| 10 | + |
| 11 | + or |
| 12 | + |
| 13 | + [Xpart, ntPart, totNtPart] = partition_X(X, nt, Npart, partIdx); |
| 14 | + |
| 15 | + In the first case it is assumed that the number of trial per stimulus, |
| 16 | + ntPart, of the final partition matrix is known. In the second case it |
| 17 | + is assumed that ntPart is not know and needs to be computed by the |
| 18 | + function itself (see also the examples below). This dual behavior can |
| 19 | + be used to save time when different partitions corresponding to the |
| 20 | + same Npart value need to be computed. |
| 21 | + |
| 22 | + --------- |
| 23 | + ARGUMENTS |
| 24 | + --------- |
| 25 | + X - response matrix |
| 26 | + nt - number of trials per stimulus |
| 27 | + Npart - number of partitions |
| 28 | + partIdx - index of the partition to be extracted |
| 29 | + ntPart - number of trials per stimulus of the partition matrix. In |
| 30 | + Matlab's language it would be ntPart = floor(nt./Npart) |
| 31 | + |
| 32 | + ------ |
| 33 | + OUTPUT |
| 34 | + ------ |
| 35 | + Xpart - partition matrix |
| 36 | + npart - number of trials per stimulus of the partition matrix. In |
| 37 | + Matlab's language it would be ntPart = floor(nt./Npart) |
| 38 | + totNtPart - total number of trials of the partition matrix. In Matlab's |
| 39 | + language it would be totNtPart = sum(ntPart) |
| 40 | + |
| 41 | + -------- |
| 42 | + EXAMPLES |
| 43 | + -------- |
| 44 | + The command |
| 45 | + |
| 46 | + [Xpart, ntPart, totNtPart] = partition_X(X, nt, 4, 2); |
| 47 | + |
| 48 | + provides the second of the four possible partitions of X together with |
| 49 | + the number of trials per stimulus and the total number of trials of the |
| 50 | + partition matrix. Alternatively |
| 51 | + |
| 52 | + Xpart = partition_X(X, nt, 4, 2, ntPart); |
| 53 | + |
| 54 | + also provides the second of the four possible partitions of X. In this |
| 55 | + case, however, the array ntPart is provided as an input to speed up |
| 56 | + computations. |
| 57 | + |
| 58 | + Copyright (C) 2010 Cesare Magri |
| 59 | + Version: 1.0.2 |
| 60 | + |
| 61 | + ------- |
| 62 | + LICENSE |
| 63 | + ------- |
| 64 | + This software is distributed free under the condition that: |
| 65 | + |
| 66 | + 1. it shall not be incorporated in software that is subsequently sold; |
| 67 | + |
| 68 | + 2. the authorship of the software shall be acknowledged and the following |
| 69 | + article shall be properly cited in any publication that uses results |
| 70 | + generated by the software: |
| 71 | + |
| 72 | + Magri C, Whittingstall K, Singh V, Logothetis NK, Panzeri S: A |
| 73 | + toolbox for the fast information analysis of multiple-site LFP, EEG |
| 74 | + and spike train recordings. BMC Neuroscience 2009 10(1):81; |
| 75 | + |
| 76 | + 3. this notice shall remain in place in each source file. |
| 77 | + |
| 78 | + ---------- |
| 79 | + DISCLAIMER |
| 80 | + ---------- |
| 81 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS |
| 82 | + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 83 | + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 84 | + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 85 | + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 86 | + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 87 | + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 88 | + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 89 | + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 90 | + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 91 | + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
0 commit comments