简体   繁体   English

如何在matlab中绘制带有坐标的2个或多个矩阵

[英]How to plot 2 or more matrix with coordinate in matlab

How I do to plot one or many matrix(m,n) using coordinates like show slicer function matlab? 如何使用显示切片器功能Matlab等坐标绘制一个或多个矩阵(m,n)? Example: I have 2 matrix: 示例:我有2个矩阵:

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. 我也有带有矩阵第一行坐标(X,Y,Z)的向量。

coordinate(meters) to matrix A: 与矩阵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: 与矩阵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: 要找到其他坐标Z,我们可以使用增量= -0.1例如:

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. 我需要在具有坐标的相同轴上绘制2张图像。

this is the effect that I need (but with coordinate in meters): http://www.mathworks.com/help/matlab/ref/slice.html?searchHighlight=slice 这是我需要的效果(但坐标以米为单位): http : //www.mathworks.com/help/matlab/ref/slice.html?searchHighlight=slice

Thanks 谢谢

The magic word is hold 魔术词是持有

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM