Please i need to plot 3 dimension figure with (x axis is x, y axis is gamma function) and z axis is value of u for this simple attached relation

조회 수: 88 (최근 30일)
The constants mu=beta=g=1. The x is vector from -20 to 20.t=2. I need to plot three dimensions Xis vector x, y axis is values of gamma alfa and z is u.
Image added by @Sam Chak

채택된 답변

Sam Chak
Sam Chak 2025년 9월 26일 14:39
For complex equations, I tend to use a symbolic approach because it allows me to verify their correctness. You should be able to write your equations accordingly. Please update your code and display the surface.
% declare symbolic variables
syms x y
% write the surface equation, z = f(x, y)
xi = @(x, y) (x + 1/4./gamma(y + 1).*2.^y)/10;
z = - 1/4*(1 + erf(sqrt(3)/2*xi(x, y)) - 1/2*exp(- sqrt(3)/2*xi(x, y).^2));
% display the equation
disp(z)
% plot the surface
fsurf(z, [-20, 20, 0, 10])
view(30, 30)
xlabel('x')
ylabel('y')
zlabel('z')

추가 답변 (1개)

Torsten
Torsten 2025년 9월 25일 23:16
편집: Torsten 2025년 9월 25일 23:38
We don't know your problem, but it should work somehow like this.
What do you mean by "the y-axis is the gamma function" ? Do you want to graph z-values as a curve over the gamma-function in the x-y-plane ?
x = -20:20;
y = 3:0.25:5;
z = y.' .* x;
surf(x,y,z)
  댓글 수: 8
T K
T K 2025년 9월 26일 12:36
The domain of Gamma function starts from +1 to 10 because the (gamma zero) =infinity.The coefficient
(mu^2/(beta*ga)) =1, (mu/beta)=1and t=1.
X-axis is x starting from -20 to +20. Y -axis is is alfa starting from 0 to 10. Z-axis is u.
I need to plot surf(x,alfa,u)

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

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by