help-octave
[Top][All Lists]
Advanced

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

Efficient Octave Code


From: rockster8
Subject: Efficient Octave Code
Date: Fri, 20 Oct 2006 14:25:33 -0700 (PDT)

Hi guys,
I'm still trying to get used to octave's notations. I'm so used to coding in
c++ that i find it really hard transitioning to octave. I've got a nested
for-loop and was wondering if there is an octave-equivalent notation that
will simplify the for-loop:

for i=1:50
   for j=1:50
      for k=1:10
         Fk(i,j) = F(i,j) .* (w(i,j) == k);
      end
   end
end

where the following are initialized as:
Fk(1:50,1:50) = 0;
F(1:50,1:50) = 0;
w(1:50,1:50) = randomly generated numbers..
-- 
View this message in context: 
http://www.nabble.com/Efficient-Octave-Code-tf2483561.html#a6925553
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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