help-octave
[Top][All Lists]
Advanced

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

Re: do exp(-0.5*z.*z) in .oct file?


From: Bill Denney
Subject: Re: do exp(-0.5*z.*z) in .oct file?
Date: Fri, 25 Jul 2008 22:18:58 -0400
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Michael Creel wrote:
Michael Creel wrote:
Hello all,
I'm trying to write the C++ code for an .oct that will perform the
equivalent of  exp(-0.5*z.*z), where z is a vector or matrix. I think
that Matrix.map will let me do the exp() to all elements, but I can't
figure out how to do the element-by-element squaring.
found it: product(z,z) does the trick. M
z.^2 should work, too.

Have a good day,

Bill


reply via email to

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