~ubuntu-branches/ubuntu/trusty/octave-quaternion/trusty-proposed

« back to all changes in this revision

Viewing changes to inst/@quaternion/inv.m

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot, Sébastien Villemot, Thomas Weber
  • Date: 2013-11-06 14:44:29 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20131106144429-1286885ymo2ldcp4
Tags: 2.0.3-1
[ Sébastien Villemot ]
* Imported Upstream version 2.0.3
* debian/copyright: reflect upstream changes.
* Bump Standards-Version to 3.9.5, no changes needed.

[ Thomas Weber ]
* debian/control: Use canonical URLs in Vcs-* fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
## Copyright (C) 2010, 2011, 2012   Lukas F. Reichlin
 
1
## Copyright (C) 2010, 2011, 2012, 2013   Lukas F. Reichlin
2
2
##
3
3
## This program is free software: you can redistribute it and/or modify
4
4
## it under the terms of the GNU General Public License as published by
20
20
 
21
21
## Author: Lukas Reichlin <lukas.reichlin@gmail.com>
22
22
## Created: May 2010
23
 
## Version: 0.3
 
23
## Version: 0.4
24
24
 
25
25
function a = inv (a)
26
26
 
37
37
  elseif (issquare (a.w))
38
38
    ## blockwise inversion, use recursion
39
39
    ## the formula is well-known from linear algebra
40
 
    n = rows (a);       # a is square
 
40
    n = rows (a.w);       # a is square
41
41
    m1 = fix (n/2);
42
42
    m2 = m1 + 1;
43
43