Mercurial > octave-nkf
comparison scripts/special-matrix/toeplitz.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | f0c3d3fc4903 |
children | 3140cb7a05a1 |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
98 ## Ignore the first element in r. | 98 ## Ignore the first element in r. |
99 ridx = ridx(ridx > 1); | 99 ridx = ridx(ridx > 1); |
100 | 100 |
101 ## Form matrix. | 101 ## Form matrix. |
102 retval = spdiags(repmat(c(cidx),nr,1),1-cidx,nr,nc)+... | 102 retval = spdiags(repmat(c(cidx),nr,1),1-cidx,nr,nc)+... |
103 spdiags(repmat(r(ridx),nr,1),ridx-1,nr,nc); | 103 spdiags(repmat(r(ridx),nr,1),ridx-1,nr,nc); |
104 else | 104 else |
105 ## Concatenate data into a single column vector. | 105 ## Concatenate data into a single column vector. |
106 data = [r(end:-1:2)(:); c(:)]; | 106 data = [r(end:-1:2)(:); c(:)]; |
107 | 107 |
108 ## Get slices. | 108 ## Get slices. |