Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Changing voxel dimesions to create a matrix
Posted:
Sep 25, 2013 10:07 AM


"Marcos Belmonte" <marcosbelm@gmail.com> wrote in message news:l1uk65$cnt$1@newscl01ah.mathworks.com... > Hi, I need to create an anisotropic matrix, with axes relations > 0.4:0.4:1(z axis), how could I change the voxel size or take into account > that my voxels are prisms insted of cubes, when I create a matrix?
Matrices in MATLAB are rectangular, and arrays are hyperrectangular; you can't have matrices whose rows have different number of elements or anything like that.
http://en.wikipedia.org/wiki/Hyperrectangle
If you want to _visualize_ your matrix such that the elements are not the same size, that's possible.
>> [x, y] = meshgrid(2:0.1:2); >> figure; surf(x, y, ones(size(x))) >> figure; surf(x.*abs(x), y, ones(size(x))) >> figure; surf(x.*abs(x), y.*abs(y), ones(size(x)))
You can even make nonrectangular elements.
>> [x, y] = meshgrid(2:2); >> x(2, 2) = 1.5; >> y(2, 2) = 1.5; >> surf(x, y, ones(size(x))) >> view(2)
For elements that are not 4sided, you'd need to go to PATCH rather than SURF or MESH.
 Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com



