help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: liboctave: Using the ' ÜÜ' operator (backslash)

 From: schteppe Subject: Re: liboctave: Using the ' ÜÜ' operator (backslash) Date: Tue, 3 Aug 2010 07:46:07 -0700 (PDT)

```Maybe this is what you are looking for?

#include <octave/oct.h>
#include <octave/xdiv.h>

DEFUN_DLD( backslash, args, nargout , "-*- texinfo -*-\n\
@deftypefn {Function File} address@hidden = } backslash (@var{A}, @var{b})\n\
Solve a linear system Ax = b. This is just a script to demonstrate how to do
it in an octfile, because it's not so obvious...\n\
@end deftypefn\n\
\n\
Author: Stefan Hedman <schteppe@@gmail.com>\n"){

octave_value retval;

if(args.length()!=2){
print_usage();
return retval;
}

Matrix b(args(0).matrix_value());
Matrix A(args(1).matrix_value());
MatrixType mt(args(1).matrix_value());
Matrix x = xleftdiv(b,A,mt);

return octave_value(x);
}

--
View this message in context:
http://octave.1599824.n4.nabble.com/liboctave-Using-the-U-U-operator-backslash-tp1613331p2311992.html
Sent from the Octave - General mailing list archive at Nabble.com.

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]
• Re: liboctave: Using the ' ÜÜ' operator (backslash), schteppe <=