[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Vectorization of a random function
From: |
altamiranomaxi |
Subject: |
Vectorization of a random function |
Date: |
Wed, 27 Jan 2016 04:33:16 -0800 (PST) |
Hi!
I'm trying to vectorize the following code:
g=zeros(ensayos,1);
for i=1:ensayos
g(i) = TiempoMuerte_Cte(N,c);
endfor
Where TiempoMuerte_Cte(N,c) is a function that does not give always the same
result, so I must run this function "ensayos" times: I've tried to write
g=zeros(ensayos,1);
g(:,1)= TiempoMuerte_Cte(N,c);
but it just computes the function once, and then repeats the value in every
coordinate of "g"
--
View this message in context:
http://octave.1599824.n4.nabble.com/Vectorization-of-a-random-function-tp4674544.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Vectorization of a random function,
altamiranomaxi <=