~ubuntu-branches/ubuntu/vivid/octave-ltfat/vivid-proposed

« back to all changes in this revision

Viewing changes to inst/private/ref_col2diag.m

  • Committer: Package Import Robot
  • Author(s): Rafael Laboissiere
  • Date: 2014-10-09 13:58:00 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20141009135800-5kw1gvovmqh34bmm
Tags: 2.0.1-1
* Imported Upstream version 2.0.1
* d/p/autoload-yes.patch: Refresh patch
* d/p/add-subdirs-to-loadpath.patch: Drop patch (fixed upstream)
* d/check.m: Use the upstream unit testing script
* d/rules: Fix permission of all *.m files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function cout=ref_col2diag(cin);
 
2
%-*- texinfo -*-
 
3
%@deftypefn {Function} ref_col2diag
 
4
%@verbatim
 
5
%REF_COL2DIAG  Compute matrix represenation from spreading symbol
 
6
%
 
7
%  This function is its own inverse.
 
8
%@end verbatim
 
9
%@strong{Url}: @url{http://ltfat.sourceforge.net/doc/reference/ref_col2diag.php}
 
10
%@end deftypefn
 
11
 
 
12
% Copyright (C) 2005-2014 Peter L. Soendergaard <soender@users.sourceforge.net>.
 
13
% This file is part of LTFAT version 2.0.1
 
14
%
 
15
% This program is free software: you can redistribute it and/or modify
 
16
% it under the terms of the GNU General Public License as published by
 
17
% the Free Software Foundation, either version 3 of the License, or
 
18
% (at your option) any later version.
 
19
%
 
20
% This program is distributed in the hope that it will be useful,
 
21
% but WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
23
% GNU General Public License for more details.
 
24
%
 
25
% You should have received a copy of the GNU General Public License
 
26
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
27
  
 
28
L=size(cin,1);
 
29
cout=zeros(L);
 
30
 
 
31
for ii=0:L-1
 
32
  for jj=0:L-1
 
33
    cout(ii+1,jj+1)=cin(ii+1,mod(ii-jj,L)+1);
 
34
  end;
 
35
end;
 
36
 
 
37
 
 
38