How plot density of function ?

조회 수: 4 (최근 30일)
salim
salim 2025년 1월 24일
댓글: Walter Roberson 2025년 1월 24일
i search for finding density plot, i have a function which i saw the density plot i want plot the same i need density plot like the picture
for this function
0.3200000000e1 / ((0.4000000000e0 * x - 0.8e0 * y) ^ 2 + (0.8e0 * x + 0.4e0 * y) ^ 2 + 0.12e1) - 0.5120000000e1 * x ^ 2 / ((0.4000000000e0 * x - 0.8e0 * y) ^ 2 + (0.8e0 * x + 0.4e0 * y) ^ 2 + 0.12e1) ^ 2

답변 (1개)

Torsten
Torsten 2025년 1월 24일
편집: Torsten 2025년 1월 24일
Your function only depends on x, not on x and y.
I'm not sure how you want to make it 2d. Thus I simply defined g(x,y) = f(x)*f(y) and plotted g.
f = @(x)0.3200000000e1 ./ ((0.4000000000e0 .* x - 0.8e0) .^ 2 + (0.8e0 .* x + 0.4e0) .^ 2 + 0.12e1) - 0.5120000000e1 .* x .^ 2 ./ ((0.4000000000e0 .* x - 0.8e0) .^ 2 + (0.8e0 .* x + 0.4e0) .^ 2 + 0.12e1) .^ 2;
x = linspace(-5,5,60);
y = linspace(-5,5,60);
surf(x,y,f(x).*f(y).')
contourf(x,y,f(x).*f(y).','Edgecolor','none')
plot(x,f(x))
  댓글 수: 6
salim
salim 2025년 1월 24일
편집: salim 2025년 1월 24일
@Torsten i update the graph i get the same graph as the paper by taking t=0 and i used range of y, thanks for your comment is help me so much
0.3200000000e1 / ((0.4000000000e0 * x - 0.8e0 * y) ^ 2 + (0.8e0 * x + 0.4e0 * y) ^ 2 + 0.12e1) - 0.5120000000e1 * x ^ 2 / ((0.4000000000e0 * x - 0.8e0 * y) ^ 2 + (0.8e0 * x + 0.4e0 * y) ^ 2 + 0.12e1) ^ 2
Walter Roberson
Walter Roberson 2025년 1월 24일
You should be asking Maple related questions on a Maple related resource, such as https://www.mapleprimes.com/

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by