[Top][All Lists]

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

Re: how to vectorize in the octave

From: Ed Meyer
Subject: Re: how to vectorize in the octave
Date: Mon, 12 Nov 2012 11:27:46 -0800

On Mon, Nov 12, 2012 at 9:39 AM, Herier chen <address@hidden> wrote:

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/

Help-octave mailing list

which exercise is this? (I assume it is from Dr. Ng's ML class)

Ed Meyer

reply via email to

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