Plot a matrix by mesh with specified x axis and y axis

13 ビュー (過去 30 日間)
Mohammad Sharif Khan
Mohammad Sharif Khan 2016 年 9 月 22 日
回答済み: KSSV 2016 年 9 月 22 日
I have this data. I want to plot X using mesh where X axis and Y axis will be xaxis and yaxis data provided here. >> whos Name Size Bytes Class Attributes
X 296x444 1051392 double
xaxis 296x1 2368 double
yaxis 1x444 3552 double

回答 (1 件)

KSSV
KSSV 2016 年 9 月 22 日
clc; clear all ;
x = linspace(0,1) ;
y = linspace(0,1) ;
[X,Y] = meshgrid(x,y) ;
mesh(x,y,'edgecolor','k') ;
view([0 90])
The above is an example. In your case you have x and y arrays along x-axes and y-axes.
[X,Y] = meshgrid(x,y) ;
mesh(x,y,'edgecolor','k') ;
view([0 90])
If you have X,Y matrices, you can also use the following function plotgrid to show the mesh:

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by