octave-maintainers
[Top][All Lists]
Advanced

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

Re: Array slicing in Octave


From: Hamid 2C
Subject: Re: Array slicing in Octave
Date: Thu, 12 May 2011 12:17:36 +0430

Thanks, that helped

Hamid

>
> The answer isn't simple. The general type in liboctave/ is idx_vector
> that is actually a polymorphic type for representing single indices,
> range slices, and full colons. So for example for the base Array class
> in liboctave/Array.h, the index(...) family of functions are in charge
> of this work. You can see the definition for them near
> liboctave/Array.cc:703 and near liboctave/Array.cc:1037 (hg changeset
> 6b2f14af2360).
>
> Note that sparse matrices must naturally have their own indexing and
> slicing rules, so its own index(...) functions are implemented near
> liboctave/Sparse.cc:1340.
>
> That should be enough to get you started. I think the best way to
> really learn this is to run Octave in a debugger and put breakpoints
> inside the functions I hinted to above; that way you can really see
> what's going on.
>
> HTH,
> - Jordi G. H.
>


reply via email to

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