Best way to convert from a 1D matrix to a 3D matrix with isotropic distribution
1 view (last 30 days)
Show older comments
Commented: Catherine Scott on 4 Feb 2014
I have 1D data which has values at equally spaced intervals from r=0 to r=r, where r is a distance i.e.
This data is isotropic (from r=0) in three dimensions, so I want to go from a 1D dataset to 3D. I thought that the best option may be to convert to spherical polar coordinates using the function cart2pol and writing a For loop to loop around all values of theta and phi, filling in the values, then convert back to cartesian coodinates. However, I know that for loops can be time consuming computationally in Matlab and wondered if there was a better way of doing it? I am using Matlab version R2011B with the image processing toolbox. Thanks!
Find more on Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!