do exp(-0.5*z.*z) in .oct file?
Bill Denney
bill at denney.ws
Fri Jul 25 21:18:58 CDT 2008
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
More information about the Help-octave
mailing list