[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cat does not convert sparse matrices?
From: |
dbateman |
Subject: |
Re: cat does not convert sparse matrices? |
Date: |
Sun, 14 Sep 2008 15:17:54 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Sat, Sep 13, 2008 at 03:24:54PM +0200, Francesco Potorti` wrote:
> Should they really be? This is the first step of a loop where I build a
> 3d matrix by catenating 2d matrices on the 3rd dim, like this:
>
> a=zeros(3,3,0);
> for z=1:Z
> b=rand(3,3);
> a=cat(3,a,b);
> endfor
>
> if cat() dropped the trailing singleton dimension, would this loop keep
> working?
They are automatically added again if needed, as if they weren't
something like
cat (3, rand(2,2), rand(2,2))
would not work either
D.