help-octave
[Top][All Lists]
Advanced

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

vectorization problem


From: dirac
Subject: vectorization problem
Date: Wed, 30 Mar 2011 09:53:23 -0700 (PDT)

Hi again,

I am trying to do a really simple calculation where I have some vector 'a'
say. All I want to do is to find:

b = [a(i)-a(i+1)]/a(i)

Is there a way to do this by vector multiplication rather than for loops? I
can't see a way to do it because the new vector will be 1 element less than
the original vector 'a'.

Thanks

-----
Still learning everyday.
--
View this message in context: 
http://octave.1599824.n4.nabble.com/vectorization-problem-tp3418677p3418677.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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