[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sum element of columns
From: |
Marco Atzeri |
Subject: |
Re: sum element of columns |
Date: |
Tue, 16 Oct 2018 09:43:42 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Am 16.10.2018 um 08:15 schrieb turbofib:
a =
9 1 6
3 6 2
1 9 8
i want this:
newArray=9+1+6;3+6+2;1+9+8
=15 11 18
maybe it is time to lean matrix multiplication ?
a= [9 1 6 ; 3 6 2 ; 1 9 8 ]
a =
9 1 6
3 6 2
1 9 8
octave:2> b = [ 1;1;1]
b =
1
1
1
octave:3> a*b
ans =
16
11
18
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus