0
votes

How I do to plot one or many matrix(m,n) using coordinates like show slicer function matlab? Example: I have 2 matrix:

A=[1 2 3 4;3 2 3 4;4 5 6 7]; %and 
B=[1 2 3 4 5; 4 3 2 3 4;4 5 6 7 8;6 7 8 9 7];

I also have vectors with the coordinates (X,Y, Z) of the first line of the matrices.

coordinate(meters) to matrix A:

X=[100.4 101.1 101.5 102];
Y=[200.4 201.1 201.5 202];
Z=[100.1 101.1 101.5 101.2];

coordinate(meters) to matrix B:

X=[200.4 201.1 201.5 202 202.7];
Y=[100.4 101.1 101.5 102 102.7];
Z=[100.1 101.1 101.5 101.2 101];

To find the others coordinates Z we can use a increment = -0.1 for example:

ZA =[100.1000  101.1000  101.5000  101.2000
  100.0000  101.0000  101.4000  101.1000
   99.9000  100.9000  101.3000  101.0000]

ZB =[ 100.1000  101.1000  101.5000  101.2000  101.0000
  100.0000  101.0000  101.4000  101.1000  100.9000
   99.9000  100.9000  101.3000  101.0000  100.8000
   99.8000  100.8000  101.2000  100.9000  100.7000]

I need to plot the 2 images in same axes with coordinates.

this is the effect that I need (but with coordinate in meters): http://www.mathworks.com/help/matlab/ref/slice.html?searchHighlight=slice

Thanks

1

1 Answers

0
votes

The magic word is hold

slice(%input for first matrix%)
hold on
slice(%input for second matrix%)