<html>
    <head>
      <base href="http://bugzilla.scilab.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:sgougeon@free.fr" title="Samuel GOUGEON <sgougeon@free.fr>"> <span class="fn">Samuel GOUGEON</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Add functions to build multi-diagonal matrixes."
   href="http://bugzilla.scilab.org/show_bug.cgi?id=6277">bug 6277</a>
                <br><br>
                ---------- Bug Summary ----------- <br>Add functions to build multi-diagonal matrixes. <br><br>

          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>

            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Add functions to build multi-diagonal matrixes."
   href="http://bugzilla.scilab.org/show_bug.cgi?id=6277#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Add functions to build multi-diagonal matrixes."
   href="http://bugzilla.scilab.org/show_bug.cgi?id=6277">bug 6277</a>
              from <span class="vcard"><a class="email" href="mailto:sgougeon@free.fr" title="Samuel GOUGEON <sgougeon@free.fr>"> <span class="fn">Samuel GOUGEON</span></a>
</span></b>
        <pre>The toeplitz() function is made for this and more.
There is no relevance to build a specific version restricted to only 3 diagonals.
Its cross-referencing in the help was improved recently.

--> b = toeplitz(sparse([1 2 0 3 zeros(1,3)]), sparse([1 4 zeros(1,3)]))
 b  = 

(  7,  5) sparse matrix

(  1,  1)      1.
(  1,  2)      4.
(  2,  1)      2.
(  2,  2)      1.
(  2,  3)      4.
(  3,  2)      2.
(  3,  3)      1.
(  3,  4)      4.
(  4,  1)      3.
(  4,  3)      2.
(  4,  4)      1.
(  4,  5)      4.
(  5,  2)      3.
(  5,  4)      2.
(  5,  5)      1.
(  6,  3)      3.
(  6,  5)      2.
(  7,  4)      3.


--> full(b)
 ans  =
   1.   4.   0.   0.   0.
   2.   1.   4.   0.   0.
   0.   2.   1.   4.   0.
   3.   0.   2.   1.   4.
   0.   3.   0.   2.   1.
   0.   0.   3.   0.   2.
   0.   0.   0.   3.   0.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>