help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sum of matrices


From: Alasdair McAndrew
Subject: Re: Sum of matrices
Date: Mon, 16 Sep 2013 17:50:21 +1000

I'd use Ben's method, in two steps:

[r,c] = size(B)
sum(reshape(B,c,c,r/c),3)

This only works of course if A is square; so that the number of rows of B is a multiple of the number of columns.


On Mon, Sep 16, 2013 at 8:04 AM, george brida <address@hidden> wrote:
Dear Octavers,
Suppose we have 100 square matrices of order 50: A_1; A_2;...;A_100. We put these matrices in the following manner: B=[A_1;A_2;...;A_50]
how we can write a program performing the sum of these matrices from the matrix B.
Thank you

_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave




--
Blog: http://amca01.wordpress.com
Web:  http://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew

reply via email to

[Prev in Thread] Current Thread [Next in Thread]