[Top][All Lists]

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

how to vectorize in the octave

From: Herier chen
Subject: how to vectorize in the octave
Date: Mon, 12 Nov 2012 12:39:23 -0500

Hi, all, I am new for the octave, and I want to know how to vectorize the following code, I have tried lots of time ,but failed. would anybody do me a favor to help. thanks.

grad = zeros(size(theta));

 m1 = size(grad); 

h = sigmoid(X*theta); 

for i=1:m1,

 grad(i) = (1.0/m)X(:,i)'(h-y); 


and another question about the octave.

what is the difference between "/" and "./" . and how to find these operators definition in the octave help document. I have not find these all kinds of operators in octave.

thanks a lot/

reply via email to

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