>
> a small and usable code example would be more useful than your many words...
>
> us
us, That makes sense... let me see
if we start with
delta_xyz = 10; %uniform index factor
[x y z]=meshgrid((1:10)*delta_xyz,(1:10)*delta_xyz,(1:10)*delta_xyz); % x,y,z corresponding to values of v; v(i,j,k) is at [x(i,j,k),y(i,j,k),z(i,j,k)] in "space"
v = magic(size(x)); %I am just setting arbitrary values at this point
[theta phi r] = cart2sph(x,y,z); % here are the corresponding spherical coordinates to each v.
what I would like to do now is create a 3d table of v, called v', that is indexed by the theta phi and r, and is sorted so theta is along the "x axis", phi is along the "z axis" and r is along the "y axis". I would also like to keep track of my indexes so I can easily go back to the original table v.
v'(theta(i,j,k),r(i,j,k),phi(i,j,k)) = v(x(i,j,k),y(i,j,k),z(i,j,k))% for all values of v
The thing about v' is that I would like to have a easily indexed grid. This would mean that there would need to be a constant delta_theta, delta_r, and delta_phi that would allow me to quickly filter or look up values within this grid. This would create empty element within the v' 3d matrix, which would be no problem to me. As long as I can continue to keep track of the x,y,z indexes of each of the values I put into v' then I am fine.
I know there is still a lot of text, but can anyone help?
