From: Paul on
Hi,

I have a 3d matrix (x,y,z) and I want to be able to check how one component changes as we go through the x axis i.e. I want to look at the components (1,1,:), how do I do this?
From: Ross W on
"Paul " <paul_flood(a)newton.co.uk> wrote in message <i2rgn3$e7p$1(a)fred.mathworks.com>...
> Hi,
>
> I have a 3d matrix (x,y,z) and I want to be able to check how one component changes as we go through the x axis i.e. I want to look at the components (1,1,:), how do I do this?

Hi

If the matrix is called d, then

>> d(1,1,:)

will display the values in the command window,

>> plot(d(1,1,:))

will draw a line,

If you want to see more at once,

>> d(1,:,:)

or

>> imagesc(d(:,:,1))

If you try other axes of the matrix, you might get errors due to singleton dimensions, and may need to try squeeze(d(1,:,:)) in place of d(1,:,:)

Ross