[Scilab-users] range of colon

Federico Miyara fmiyara at fceia.unr.edu.ar
Wed Jan 15 02:36:06 CET 2020


Samuel,

> Really?:
>
> --> x = rand(3,4,2);
> --> N= 5;
> --> siz = size(x);
> --> a = repmat(0,[N, siz(2:$)]);     // Create array of 0's whose 
> columns have length N
> --> a(1:siz(1), :) = x
>
> Submatrix incorrectly defined.
>

It worked for size (8,1,3). It shouldn't work either, but somehow it 
does...

> Why not using resize_matrix()?
>

Thanks!!!!!

It is exactjy what I needed, only I was not aware of its existence!

Regards,

Federico Miyara



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200114/cdbaee8f/attachment.htm>


More information about the users mailing list