Hi community,
Please I need your help to plot the figures like in the picture below.
Thanks

2 Kommentare

Sam Chak
Sam Chak am 7 Aug. 2022
@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 am 8 Aug. 2022
@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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

M.B
M.B am 8 Aug. 2022

0 Stimmen

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

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 8 Aug. 2022

0 Stimmen

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.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2019b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by