view examples/addtwomatrices.cc @ 18838:0dae39867b2b

cleanup of tic and ticlabel code * scripts/plot/util/private/__go_draw_axes__.m (do_tics_1): Reorder manual and automatic tic mode and save two string comparisons.
author Stefan Mahr <dac922@gmx.de>
date Tue, 18 Mar 2014 20:59:04 +0100
parents be41c30bcb44
children
line wrap: on
line source

#include <octave/oct.h>

DEFUN_DLD (addtwomatrices, args, , "Add A to B")
{
  int nargin = args.length ();

  if (nargin != 2)
    print_usage ();
  else
    {
      NDArray A = args(0).array_value ();
      NDArray B = args(1).array_value ();
      if (! error_state)
        return octave_value (A + B);
    }

  return octave_value_list ();
}