Scatter plot to contour plot

回答 (1 件)

Brahmadev
Brahmadev 2024 年 4 月 24 日

0 投票

You can use the following code for contour plot of your data:
filePath = 'filePath/k.txt'; % Define the file path
dataMatrix = readmatrix(filePath);
zz = dataMatrix(:, 3);
v=-50:0.001:50; % contour levels
tri=delaunay(dataMatrix(:, 1), dataMatrix(:, 2));
[C,h]=tricontour(tri,dataMatrix(:, 1),dataMatrix(:, 2),zz,v);
Hope this helps!

カテゴリ

タグ

質問済み:

2024 年 4 月 24 日

回答済み:

2024 年 4 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by