view examples/code/addtwomatrices.cc @ 20653:9cef0a1207e4 @

cell2mat: add tests for cells of cells and char arrays
author Carnë Draug <carandraug@octave.org>
date Tue, 13 Oct 2015 11:40:05 +0100
parents 2f8500ca91d3
children
line wrap: on
line source

#include <octave/oct.h>

DEFUN_DLD (addtwomatrices, args, , "Add A to B")
{
  if (args.length () != 2)
    print_usage ();

  NDArray A = args(0).array_value ();
  NDArray B = args(1).array_value ();

  return octave_value (A + B);
}