help-octave
[Top][All Lists]
Advanced

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

Re: classdef ready for testing with qtfm (quaternions for matlab)?


From: Lukas Reichlin
Subject: Re: classdef ready for testing with qtfm (quaternions for matlab)?
Date: Sun, 14 Dec 2014 20:26:44 +0100

On 14.12.2014, at 17:51, Wolfgang Rosner <address@hidden> wrote:

> Dear developers,
> 
> I am looking for a hypercomplex library for octave.
> 
> there is a matlab-package here
> http://qtfm.sourceforge.net/
> 
> but it uses the evil "classdef"  syntax.
> 
> I tried with octave 4.1.0+ from
> http://hg.savannah.gnu.org/hgweb/octave/branches
> download 2014-12-13
> 
> but could not get qtfm working.
> Using the new gui (great :-) ) debugger, it looks to me like new quaternions 
> were constructed as intended, but upon leaving the constructor, the hidden 
> private variables (w, x, y, z) appear to be forgotten.
> 
> I can inspect q.x etc while debugging in the constructor.
> I cannot inspect them in the caller.
> whos reports a object size of 0 after leaving the caller
> 
> 
> snippet from test log
> --------8<----------------------------------------------------
> 
> 9: q = quaternion(1, 0, 0);
> debug>
> class: quaternion
> method block
> constructor: quaternion
> property block
> property: w
> property default:
> property: x
> property default:
> property: y
> property default:
> property: z
> property default:
> constructor
> deleting quaternion object (value)
> ans = quaternion object
>>> whos
> Variables in the current scope:
> 
>   Attr Name        Size                     Bytes  Class
>   ==== ====        ====                     =====  =====
>        ans         1x1                          0  quaternion
> 
> Total is 1 element using 0 bytes
> 
> --------8<----------------------------------------------------
> 
> 
> I have only basic experience in octave / OO Programming, so this may well be 
> a 
> beginners mistake.
> Or did I jump right in the middle of a running process of classdef 
> development, with still a long way to go for maturity?
> I can contribute by feedback my testing experience, if there is a reasonable 
> chance for success.
> If so, can you give me a pointer to start?
> 
> People have been asking for funding development. I can't afford to pay all 
> the 
> development, but I could contribute to some kind of crowdfunding pool.
> 
> The alternative is to rewrite the classdef stuff to well-tried octave syntax.
> Is there a kind of howto -like receipe?
> There are only 2 directories @octonion and @quaternion.
> So do I only have to rewrite the two constructors there 
> @octonion/octonion.m
> and
> @quaternion/quaternion.m
> can all the other methods stay in place?
> What about private subdirectories?
> 
> Any help appreciated.
> I promise to share my experience if it works.
> 
> Sincerely 
> 
> Wolfgang Rosner
> address@hidden

Hi Wolfgang,

There is a quaternion package for Octave:

http://octave.sourceforge.net/quaternion/index.html

Install it by typing

        pkg install -forge quaternion

inside Octave.

Hope this helps,
Lukas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]