On Thu, Jan 15, 2015 at 15:20:58 -0800, withaar wrote:
I am working on the quaternion toolbox and an running into odd behaviour. I
like making my own folder somewhere and work on functions, possibly
shadowing the original. In my case I originally did not have the quaternion
toolbox installed - at the moment I do but the result is the same.
Question: does pkg does something special when loading/installing a toolbox?
In general, yes a package may have a PKG_ADD script that is executed
when it is loaded each time using "pkg load". And installing a package
may do several things as well, such as compiling oct-files.
q = quaternion(randn(2,3,4),randn(2,3,4),randn(2,3,4),randn(2,3,4));
q.w(1,1,1) = 0
error: a cs-list cannot be further indexed
error: invalid assignment to cs-list outside multiple assignment
Where does the difference in behaviour come from? For the alternate version
subsref/subsassgn never get called.
I can't reproduce this, attempting to do the same thing that I think you
are, so I'm not sure. I guess the obvious question is, is this the same
version of the quaternion package? Or is it possibly an older version
and you are simply seeing a bug that has been fixed in 2.2.2?
Here's what I did:
$ hg clone https://bitbucket.org/paramaniac/quaternion
$ cd quaternion/src
$ mkoctfile is_real_array.cc
$ cd ..
octave:1> addpath ([pwd "/inst"]);
octave:2> addpath ([pwd "/src"]);
octave:3> q =
ans = -0.033714
octave:5> q.w(1,1,1) = 0;
ans = 0