Hi,
I want to plot 2D surface map using 3 vector parameters, e.g
x-axis is depth
y-axis is distance
and 3rd parameter is resistivity.
I have arrange the data into 3 columns x y resistivity.
Regards,
Perveiz

 採用された回答

KSSV
KSSV 2019 年 3 月 11 日

0 投票

Read about pcolor, scatter

9 件のコメント

Perveiz Khalid
Perveiz Khalid 2019 年 3 月 11 日
I read it but it is not the same for what I am looking for
KSSV
KSSV 2019 年 3 月 11 日
Why not? Attach your data...I will show you how to get that.
Perveiz Khalid
Perveiz Khalid 2019 年 3 月 11 日
OK. Please see attached excel sheet.
Use 1st three column.
KSSV
KSSV 2019 年 3 月 11 日
Which sheet? Attach only data.
Perveiz Khalid
Perveiz Khalid 2019 年 3 月 11 日
Please see attached
Perveiz Khalid
Perveiz Khalid 2019 年 3 月 12 日
Hi KSSV! I had attached data did you try to plot? Regards
KSSV
KSSV 2019 年 3 月 12 日
[num,txt,raw] = xlsread('AA_Crosssection.xlsx') ;
pos = num(:,1) ;
depth = num(:,2) ;
res = num(:,3) ;
ves = num(:,4) ;
x = pos; % ves
y = depth ;
z = res ;
% Remove Nans in data
x = x(~isnan(y)) ;
z = z(~isnan(y)) ;
y = y(~isnan(y)) ;
%
nx = 100; ny = 100 ;
xi = linspace(min(x),max(x),nx) ;
yi = linspace(min(y),max(y),ny) ;
[X,Y] = meshgrid(xi,yi) ;
F = scatteredInterpolant(x,y,z,'nearest','none') ;
Z = F(X,Y) ;
pcolor(X,Y,Z);
shading interp ;
colorbar
figure
scatter(x,y,10,z,'filled') ; colorbar
Are you sure data is of the plot shown in the question?
Perveiz Khalid
Perveiz Khalid 2019 年 3 月 12 日
Thank you dear KSSV. It is working but doesn't same figure.
No data is not of the same. The PNG figure associated to this dataset is attached.
KSSV
KSSV 2019 年 3 月 12 日
Thanks is accepting and voting the answer..:)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索

質問済み:

2019 年 3 月 11 日

コメント済み:

2019 年 3 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by