Jan 17, 2016

[octave] Recipes

Function:
# Anonymous function:
# https://www.gnu.org/software/octave/doc/interpreter/Anonymous-Functions.html
f=@(h) 1 ./ (1 + exp(-h)); % 1 / (1 + exp(-h));
result = f(x)


General:
# Get 3 by 3 random real number matrix
ceil(10.*rand(3,3))

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.