Quantcast
Channel: MATLAB Central Newsreader - changing a 3d matrix to a 2d matrix
Viewing all articles
Browse latest Browse all 2

Re: changing a 3d matrix to a 2d matrix

$
0
0
On 2/9/2013 4:34 PM, James wrote:
> Hi,
>
> I have a 3 dimensional array, dimensions x,y,z=219x289x43.
> This is an array of temp data on a grid where x and y indicate a grid
> point on a latitude, longitiude grid and z is height. I have selected a
> number of grid points from this matrix and I now want to remove all the
> others so that I have for example an array 10x43.
> Any help on how to do this would be appreciated?

How did you write the selection criterion?

You can either save those values into an array and then just clear the
larger one if not needed any longer or negate the selection indices and
set the elements not selected to []. Of course, unless the subset
selected is square, the returned values will be returned as a vector.

--

Viewing all articles
Browse latest Browse all 2

Trending Articles