[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
adding vectors and matrices
From: |
Andreas Heitmann |
Subject: |
adding vectors and matrices |
Date: |
Fri, 22 Aug 1997 10:30:27 +0200 |
Hi,
I'm using octave for some time now, but I'm still wondering if there
is a simple way to add a fixed column vector to a number of other
column vectors stored in a matrix. Currently i'm using a loop like the
following:
v=[1;2;3];
for i=1:columns(x)
y(:,i)=x(:,i)+v;
endfor
Is it possible to compute y without a loop statement?
Regards,
--
Andreas Heitmann Office: +49-561-804-4571
Universit"at Gesamthochschule Kassel Home: +49-561-601304
Arbeitsgruppe Theoretische Physik Fax: +49-561-602308
Heinrich-Plett-Str. 40 EMail: address@hidden
34132 Kassel Finger/Talk: address@hidden
Germany http://www.physik.uni-kassel.de/physik/theorie/heitmann
- adding vectors and matrices,
Andreas Heitmann <=