A better way to act on a dim of an N-d array?

Ben Abbott bpabbott at mac.com
Thu Jan 31 07:49:26 CST 2008


On Jan 29, 2008, at 10:35 PM, Ben Abbott wrote:

>
> On Jan 29, 2008, at 8:30 PM, Ben Abbott wrote:
>
>> While working on quantile and prctile functions for Octave, I am in  
>> need to functionally operate on the dim-th dimension of a N-d array.

What I'm looking to do is allow a specific dimension of an N-d array  
to be acted upon by a function that returns a vector of a consistent  
length.

The algirithms for calculating the quanitles of a sample are  
sufficiently varied that the methods used by mean(), median(), etc, to  
support N-d arrays, are insufficient for my application.

As I am not a competent c/c++ programmer, I chose to do the job in an  
m-file ... but is there a better way to do this?

Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dimfunc.m
Type: application/octet-stream
Size: 4011 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080131/ba77da8e/attachment.obj 
-------------- next part --------------



More information about the Octave-maintainers mailing list