Navigation

Operators and Keywords

Function List:

C++ API

bsxfun.cc File Reference

#include <string>
#include <vector>
#include <list>
#include "lo-mappers.h"
#include "oct-map.h"
#include "defun-dld.h"
#include "parse.h"
#include "variables.h"
#include "ov-colon.h"
#include "unwind-prot.h"

Include dependency graph for bsxfun.cc:


Defines

#define BSXDEF(T)
#define BSXINIT(T, CLS, EXTRACTOR)
#define BSXLOOP(T, CLS, EXTRACTOR)
#define BSXEND(T)

Functions

 DEFUN_DLD (bsxfun, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} bsxfun (@var{f}, @var{a}, @var{b})\n\ Applies a binary function @var{f} element-wise to two matrix arguments\n\ @var{a} and @var{b}. The function @var{f} must be capable of accepting\n\ two column vector arguments of equal length, or one column vector\n\ argument and a scalar.\n\ \n\ The dimensions of @var{a} and @var{b} must be equal or singleton. The\n\ singleton dimensions of the matrices will be expanded to the same\n\ dimensionality as the other matrix.\n\ \n\ @seealso{arrayfun, cellfun}\n\ @end deftypefn")

Define Documentation

#define BSXDEF ( T   ) 

Value:

T result_ ## T; \
                  bool have_ ## T = false;

#define BSXEND ( T   ) 

Value:

(have_ ## T) \
                    retval (0) = result_ ## T;

#define BSXINIT ( T,
CLS,
EXTRACTOR   ) 

Value:

(result_type == CLS) \
                        { \
                            have_ ## T = true; \
                            result_ ## T = \
                                tmp (0). EXTRACTOR ## _array_value (); \
                            result_ ## T .resize (dvc); \
                        }

#define BSXLOOP ( T,
CLS,
EXTRACTOR   ) 

Value:

(have_ ## T) \
                          { \
                            if (tmp (0).class_name () != CLS) \
                              { \
                                have_ ## T = false; \
                                C = result_ ## T; \
                                C = do_cat_op (C, tmp (0), ra_idx); \
                              } \
                            else \
                              result_ ## T .insert \
                                (tmp(0). EXTRACTOR ## _array_value (), \
                                ra_idx); \
                          }


Function Documentation

DEFUN_DLD ( bsxfun  ,
args   
)