Extract X,Y,Z data from a MATLAB figure by interacting with a line parallel to X or Y axis.

8 ビュー (過去 30 日間)
uma shankar
uma shankar 2018 年 1 月 30 日
編集済み: Silver 2018 年 11 月 14 日
Hi, I have a 3 D plot in MATLAB. I want to cut by planes along X or Y axis and plot the Z values of the cut planes, in order to get the 2 D profiles along that plane. Just like many metrology software, image can be read along X and Y axes for profile heights, I want to do similar task from Matlab figure. In MATLAB figure we have option of cursor data, which can give X,Y,Z points on the figure. But I want to data all the data along a line intersecting the figure. Can anyone help me please?
  1 件のコメント
Silver
Silver 2018 年 11 月 14 日
編集済み: Silver 2018 年 11 月 14 日
Hello ! you may use the function colorbar to color the third parameter and you can use the functioon pcolor or scatter
h1 = pcolor(X,Y,Z); % gives a 2D raster plane
shading flat;
axis image;
colorbar;
or
scatter(X,Y,5,Z,'fill'); % gives a 2D line with X and Y axis and variability of the Z is mentionned by the colorbar
colorbar;
set(gca,'yticklabel',X);
set(gca,'xticklabel',Y)
hope that could help you !

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2018 年 1 月 30 日
If you have (X,Y) data coordinates in hand, for which you want the respective Z values.......you can do interpolation and get those values....and then you can plot. Have a look on ScatteredInterpolant.

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by