Linear Algebra and the C Language/a04d


Octave commands: Functions
# --------------------------------
# Copy/Paste into the octave window
#
function y = f (x)
  y = +1.00*x^2 -10.40*x +0.60;
endfunction
#
f (+1)
f (+2)


# --------------------------------
# Copy/Paste into the octave window
#
function xy = f (x,y)
  xy = +1.00*x^2 +1.00*y^2 -10.40*x -2.40*y +0.60;
endfunction
#
f (+5,-3)
f (+4,-1)