how can I plot this figures

1 回表示 (過去 30 日間)
Abdelkader Hd
Abdelkader Hd 2022 年 8 月 7 日
コメント済み: Abdelkader Hd 2022 年 8 月 8 日
Hi community,
Please I need your help to plot the figures like in the picture below.
Thanks
  2 件のコメント
Sam Chak
Sam Chak 2022 年 8 月 7 日
@Abdelkader Hd, these plots require either some maths or the data point needed to create them. Can you provide the data as labeled in the x- and y-axes?
Abdelkader Hd
Abdelkader Hd 2022 年 8 月 8 日
@Sam Chak Thanks for your time, for example I have F is a function of x and y (F(x,y)). I need just the code used on matlab to plot a density

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

採用された回答

M.B
M.B 2022 年 8 月 8 日
Try the function contourf:
x = linspace(-2*pi,2*pi);
y = linspace(0,4*pi);
[X,Y] = meshgrid(x,y);
Z = sin(X) + cos(Y);
figure(101);
contourf(X,Y,Z,100, 'edgecolor','none');
colormap hot; % use colormapeditor for a customised colormap
  1 件のコメント
Abdelkader Hd
Abdelkader Hd 2022 年 8 月 8 日
@M.B thank you sir for your help

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 8 月 8 日
https://www.mathworks.com/help/matlab/ref/histcounts2.html can be used to calculate the counts for density plot purposes. imagesc() with the appropriate colormap and colorbar(). Use tiledlayout to arrange the plots.
  1 件のコメント
Abdelkader Hd
Abdelkader Hd 2022 年 8 月 8 日
@Walter Roberson thank you sir for your help

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

カテゴリ

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

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by