colorplot of 3 columns

3 ビュー (過去 30 日間)
Farshad Daraei Ghadikolaei
Farshad Daraei Ghadikolaei 2020 年 10 月 20 日
回答済み: KSSV 2020 年 10 月 20 日
Still no one could help me with this question.
I have a .csv file with 3 columns of different range of data. Each column contain 500,000 rows including some duplicate numbers. I am trying to plot a colorplot like the one I attached here. I would be happy if anyone could help me.

回答 (1 件)

KSSV
KSSV 2020 年 10 月 20 日
x = A(:,1) ; y = A(:,2) ; z = A(:,3) ;
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
%% USe Interpoaltion
m = 100 ; n = 100 ;
xi = linspace(min(x),max(x),m) ;
yi = linspace(min(y),max(y),n) ;
[X,Y] = meshgrid(xi,yi) ;
Z = griddata(x,y,z,X,Y) ;
pcolor(X,Y,Z)
shading interp
colorbar

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by