<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253583</link>
    <title>MATLAB Central Newsreader - help with blkdiag()</title>
    <description>Feed for thread: help with blkdiag()</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 12 Jun 2009 21:54:01 -0400</pubDate>
      <title>help with blkdiag()</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253583#656898</link>
      <author>Tim Yang</author>
      <description>I have a 2D matrix &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;1   2   3  4   5&lt;br&gt;
&amp;nbsp;&amp;nbsp;6   7   8  9  10&lt;br&gt;
&amp;nbsp;11 12 13 14 15&lt;br&gt;
&amp;nbsp;16 17 18 19 20&lt;br&gt;
&lt;br&gt;
I want to create a diagonal matrix without using loops and using blkdiag()&lt;br&gt;
ie matrix&lt;br&gt;
&amp;nbsp;&amp;nbsp;1   2   3  4   5                                         alll zero&lt;br&gt;
&amp;nbsp;&amp;nbsp;0   0   0  0   0   6   7   8   9  10&lt;br&gt;
&amp;nbsp;&amp;nbsp;0   0   0  0   0   0   0   0   0    0  11 12 13 14 15&lt;br&gt;
&amp;nbsp;&amp;nbsp;0   0   0  ...                                                      16 17 18 19 20&lt;br&gt;
&lt;br&gt;
I don't want to convert it to cell array (because the matrix is large, conversion is time consuming).  blkdiag()  only accept ( row vector, row vector...)&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
Tim</description>
    </item>
  </channel>
</rss>

