From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Index matrix to sparse matrix... saving memory
Date: Sun, 30 May 2010 12:02:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 12
Message-ID: <httk3s$hb0$>
References: <htrfev$fo7$> <htrk32$2vm$> <htrlad$in3$> <htrmbl$nn6$> <hts2hl$3tk$> <htt9rq$1s8$> <htthum$sg$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1275220924 17760 (30 May 2010 12:02:04 GMT)
NNTP-Posting-Date: Sun, 30 May 2010 12:02:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:640659

"Anthony Hopf" <> wrote in message <htthum$sg$>...

> Bruno,
> I had downloaded your histcn function at one point to try and understand how it could be applied to my problem, but I must not fully understand it's abilities.  To me, I would think you would need to work from the edge of a matrix to use the HISTC and HISTCN functions.  Starting from an arbitrary point (r=0 in the above case could be in the center of the matrix), I don't understand how the function could be used to bin evenly spaced cartesian 3d space into bins defined by their spherical transforms?

If problem address in this thread needs can be solved with the built-in function HISTC (one dimensional binning). You have to understand how it works. The way you are using FIND for the same purpose is very inefficient.

The HISTCN I showed in other thread is an extension of HISTC. You don't need it here. And in the other thread I showed you the code that gives the rigorously identical result that with the double/triple for-loops in the first post. It seems you are trying to visualize what HISTN does in term of geometry, and it gets you lost in the way. Think in a more abstract way of mapping and you'll be fine.